--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/b4f0839b-e89f-428a-9162-86f310dbcb3b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I believe you are looking for the inventory_hostname variable.I also tend to use this in combination with ansible_ssh_host for completeness, such as:
{{ ansible_ssh_host|default(inventory_hostname) }}
On Friday, December 19, 2014, Fazal-e-Rehman Khan <fazale...@gmail.com> wrote:
Dear All,--My hosts file looks like this.[client]192.168.1.23[server]192.168.1.24[exchange]192.168.1.25In my playbook, I want to run a script on a remote machine ("client" in my case) which requires the IP address of the other remote machine (server) as an cmd line argument to that script. My playbook looks like this.hosts: clienttasks:- shell: myscript.sh {{ server }} {{ somevalue }}What should I do? Please help.Regards,Fazal-e-Rehman Khan
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscribe@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/b4f0839b-e89f-428a-9162-86f310dbcb3b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.