Special variables.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Thu, 05 Nov 2020 00:22:31 +0200
changeset 2449 508963deb620
parent 2448 1a02d5429a5d
child 2450 3e1990dc6ac8
Special variables.
ansible.rst
--- a/ansible.rst	Wed Nov 04 21:52:41 2020 +0200
+++ b/ansible.rst	Thu Nov 05 00:22:31 2020 +0200
@@ -180,6 +180,18 @@
 * With ``free`` strategy tasks are executed without waiting for completion of the same task on every
   host.
 
+Special variables
+=================
+
+You can dump any variable by ``debug`` task in a playbook or using mudule::
+
+  ansible $host -m debug -a var=groups
+
+* ``vars`` holds everything!
+* ``hosts`` holds all inventory definitions
+* ``groups`` holds info about grouping of hosts
+* ``ansible_facts`` all collected facts about current host
+
 Blocks
 ======