On Monday, 19 November 2018 07:34:17 CET Tom K. wrote: > ansible-playbook -i infra --limit mysql06 main.yml --tags "mysql" -v --check > > fatal: [mysql06]: FAILED! => {"changed": false, "msg": > "AnsibleUndefinedVariable: > 'ansible.vars.hostvars.HostVarsVars object' has no attribute > 'ansible_default_ipv4'"} > > But it seems to work opposite to the way described above (Apologies if I'm > misreading). The error is thrown for ANY host that I use the *--limit* > flag on, not the ones that I don't use the limit on. > > I would have expected it to gather facts on the host I'm limiting the run > too, not the ones I'm excluding.
Yes, it's only gathering facts on the host in the limit. The error message isn't about that it can't find ansible_default_ipv4 on the host in the limit (mysql06), it's about mysql06 cant find ansible_default_ipv4 for host mysql05. -- Kai Stian Olstad -- 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/4441790.OQkjQEKeQW%40x1. For more options, visit https://groups.google.com/d/optout.