Open erivandosena opened 1 year ago
Hi
inventory_hostname
is a special variable : https://docs.ansible.com/ansible/latest/reference_appendices/special_variables.html
‘current’ host being iterated over in the play
With this inventory :
[DEV_VMS]
vm1.home.lab
vm2.home.lab
I will add a full example in the README.md
When running the playbook, for the first iteration inventory_hostname
would be vm1.home.lab
, and vm2.home.lab
on the second iteration.
Thanks for clarifying, an example in the README of how to start the playbook will be very enlightening. ;)
the variable {{ inventory_hostname }} always returns empty, where is it defined?
could you include an example in the README.md ?