hi, im running a master/slave cluster where i want to add another slave via ansible so i am limiting the play to the new slave
ansible-playbook -vvv -l mesos_slaves[3] -i hosts-prod.yml playbook.yml -u xxx -k -K Add a point there comes a template which needs the ips of the other slaves {% for host in groups['mesos_slaves'] %} {{ hostvars[host]['ansible_eth0']['ipv4']['address'] }}" {% endfor %} where mesos_slaves is [mesos_slaves] slave01 slave02 slave03 slave04 The play ends there with fatal: [slave04] => {'msg': "AnsibleUndefinedVariable: One or more undefined variables: 'dict object' has no attribute 'ansible_eth0'", 'failed': True} fatal: [slave04] => {'msg': "AnsibleUndefinedVariable: One or more undefined variables: 'dict object' has no attribute 'ansible_eth0'", 'failed': True} but a ansible -i hosts-prod.yml slave01 -m setup -a "filter=*eth0*" gives me slave01 | success >> { "ansible_facts": { "ansible_eth0": { "active": true, "device": "eth0", "ipv4": { "address": "192.168.0.12", Why is it not working in the play? Mike -- 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+unsubscr...@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/f881d9a8-6f1a-4f75-9817-b656837c67a0%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.