Or is there any way in ansible to fetch the IP of the hosts where the
playbooks are executed?
As like .retry file in ansible which holds the IP of failed one, is there
any ways in ansible which holds the IPs of all executed hosts alone(ie.,
hosts in which the playbook executes)
On Wednesday, J
You can get the current executing ip addresses in the playbook using the
magic variable inventory_hostname
You can find more information at
https://docs.ansible.com/ansible/latest/user_guide/playbooks_variables.html#magic-variables-and-how-to-access-information-about-other-hosts
On Wednesday,
Yes, I can get the current target host IP using "inventory_hostname". But
the problem is I have to store that IP in a local file in my master machine
(ie., where the ansible runs)
On Wednesday, June 26, 2019 at 11:54:53 PM UTC+5:30, Tony Chia wrote:
>
> You can get the current executing ip addre