My ansible version is 2.5.
In my playbook, one host needs to access other host's variable which I
defined in inventory file.
I used {{ hostvars['groupname'].var_name }} and get an error, I also tried
to use {{ hostvars['groupname']['var_name'] }} which get an error also.
So, I want to be clear how to use hostvars to access another host variables
defined in the inventory file?
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/e5ee9ca4-0099-4d2a-aa8a-659a69815ea3%40googlegroups.com.