|
|
@ -174,8 +174,9 @@ To see what information is available, try the following::
|
|
|
|
|
|
|
|
|
|
|
|
This will return a ginormous amount of variable data, which may look like this, as taken from Ansible 1.4 on a Ubuntu 12.04 system
|
|
|
|
This will return a ginormous amount of variable data, which may look like this, as taken from Ansible 1.4 on a Ubuntu 12.04 system
|
|
|
|
|
|
|
|
|
|
|
|
.. code-block: none
|
|
|
|
.. code-block: json
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
"ansible_all_ipv4_addresses": [
|
|
|
|
"ansible_all_ipv4_addresses": [
|
|
|
|
"REDACTED IP ADDRESS"
|
|
|
|
"REDACTED IP ADDRESS"
|
|
|
|
],
|
|
|
|
],
|
|
|
@ -392,9 +393,9 @@ This will return a ginormous amount of variable data, which may look like this,
|
|
|
|
"ansible_product_version": "None",
|
|
|
|
"ansible_product_version": "None",
|
|
|
|
"ansible_python_version": "2.7.3",
|
|
|
|
"ansible_python_version": "2.7.3",
|
|
|
|
"ansible_selinux": false,
|
|
|
|
"ansible_selinux": false,
|
|
|
|
"ansible_ssh_host_key_dsa_public": "REDACTED KEY VALUE"
|
|
|
|
"ansible_ssh_host_key_dsa_public": "REDACTED KEY VALUE",
|
|
|
|
"ansible_ssh_host_key_ecdsa_public": "REDACTED KEY VALUE"
|
|
|
|
"ansible_ssh_host_key_ecdsa_public": "REDACTED KEY VALUE",
|
|
|
|
"ansible_ssh_host_key_rsa_public": "REDACTED KEY VALUE"
|
|
|
|
"ansible_ssh_host_key_rsa_public": "REDACTED KEY VALUE",
|
|
|
|
"ansible_swapfree_mb": 665,
|
|
|
|
"ansible_swapfree_mb": 665,
|
|
|
|
"ansible_swaptotal_mb": 1021,
|
|
|
|
"ansible_swaptotal_mb": 1021,
|
|
|
|
"ansible_system": "Linux",
|
|
|
|
"ansible_system": "Linux",
|
|
|
@ -404,6 +405,7 @@ This will return a ginormous amount of variable data, which may look like this,
|
|
|
|
"ansible_userspace_bits": "64",
|
|
|
|
"ansible_userspace_bits": "64",
|
|
|
|
"ansible_virtualization_role": "guest",
|
|
|
|
"ansible_virtualization_role": "guest",
|
|
|
|
"ansible_virtualization_type": "VMware"
|
|
|
|
"ansible_virtualization_type": "VMware"
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
In the above the model of the first harddrive may be referenced in a template or playbook as::
|
|
|
|
In the above the model of the first harddrive may be referenced in a template or playbook as::
|
|
|
|
|
|
|
|
|
|
|
@ -658,7 +660,7 @@ Additionally, ``group_names`` is a list (array) of all the groups the current ho
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
``groups`` is a list of all the groups (and hosts) in the inventory. This can be used to enumerate all hosts within a group.
|
|
|
|
``groups`` is a list of all the groups (and hosts) in the inventory. This can be used to enumerate all hosts within a group.
|
|
|
|
For example
|
|
|
|
For example:
|
|
|
|
|
|
|
|
|
|
|
|
.. code-block:: jinja
|
|
|
|
.. code-block:: jinja
|
|
|
|
|
|
|
|
|
|
|
|