Vikram, I believe ansible_default_ipv4 is not fetched by ansible in the first go. Try removing the facts of the respective host and running again. Make sure you are gathering the facts first.
-AliJ On Sat, Nov 19, 2016 at 10:50 PM, Vikram Ranabhatt < [email protected]> wrote: > TASK [common : Hosts | populate inventory into hosts file] > ********************* > fatal: [inception-vm]: FAILED! => {"failed": true, "msg": "the field > 'args' has an invalid value, which appears to include a variable that is > undefined. The error was: 'dict object' has no attribute > 'ansible_default_ipv4'\n\nThe error appears to have been in > '/home/ubuntu/ansible/roles/common/tasks/main.yml': line 52, column 3, > but may\nbe elsewhere in the file depending on the exact syntax > problem.\n\nThe offending line appears to be:\n\n\n- name: Hosts | populate > inventory into hosts file\n ^ here\n"} > > > *ansible -m setup -i inventory/inventory all -a "filter=ipv4"* > > third-party-instance | UNREACHABLE! => { >> "changed": false, >> "msg": "Failed to connect to the host via ssh: Connection timed out >> during banner exchange\r\n", >> "unreachable": true >> } >> kuberenetes-node-4 | UNREACHABLE! => { >> "changed": false, >> "msg": "Failed to connect to the host via ssh: Connection timed out >> during banner exchange\r\n", >> "unreachable": true >> } >> kuberenetes-node-1 | UNREACHABLE! => { >> "changed": false, >> "msg": "Failed to connect to the host via ssh: Connection timed out >> during banner exchange\r\n", >> "unreachable": true >> } >> kuberenetes-node-2 | UNREACHABLE! => { >> "changed": false, >> "msg": "Failed to connect to the host via ssh: Connection timed out >> during banner exchange\r\n", >> "unreachable": true >> } >> kuberenetes-node-3 | UNREACHABLE! => { >> "changed": false, >> "msg": "Failed to connect to the host via ssh: Connection timed out >> during banner exchange\r\n", >> "unreachable": true >> } >> kuberenetes-master-1 | UNREACHABLE! => { >> "changed": false, >> "msg": "Failed to connect to the host via ssh: Connection timed out >> during banner exchange\r\n", >> "unreachable": true >> } >> kuberenetes-node-5 | UNREACHABLE! => { >> "changed": false, >> "msg": "Failed to connect to the host via ssh: Connection timed out >> during banner exchange\r\n", >> "unreachable": true >> } >> kuberenetes-master-2 | UNREACHABLE! => { >> "changed": false, >> "msg": "Failed to connect to the host via ssh: Connection timed out >> during banner exchange\r\n", >> "unreachable": true >> } >> kuberenetes-master-3 | UNREACHABLE! => { >> "changed": false, >> "msg": "Failed to connect to the host via ssh: Connection timed out >> during banner exchange\r\n", >> "unreachable": true >> } >> edge-instance-1 | UNREACHABLE! => { >> "changed": false, >> "msg": "Failed to connect to the host via ssh: Connection timed out >> during banner exchange\r\n", >> "unreachable": true >> } >> edge-instance-2 | UNREACHABLE! => { >> "changed": false, >> "msg": "Failed to connect to the host via ssh: Connection timed out >> during banner exchange\r\n", >> "unreachable": true >> } >> opendj | UNREACHABLE! => { >> "changed": false, >> "msg": "Failed to connect to the host via ssh: Connection timed out >> during banner exchange\r\n", >> "unreachable": true >> } >> inception | SUCCESS => { >> "ansible_facts": { >> "ansible_all_ipv4_addresses": [ >> "10.32.1.9" >> ], >> "ansible_default_ipv4": { >> "address": "10.32.1.9", >> "alias": "eth0", >> "broadcast": "10.32.1.255", >> "gateway": "10.32.1.1", >> "interface": "eth0", >> "macaddress": "fa:16:3e:cb:d6:e1", >> "mtu": 1500, >> "netmask": "255.255.255.0", >> "network": "10.32.1.0", >> "type": "ether" >> } >> }, >> "changed": false >> } >> >> -- > 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 post to this group, send email to [email protected]. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/ansible-project/5302bfca-cb4a-4caa-8c31-b3f4f47d403d%40googlegroups. > com > <https://groups.google.com/d/msgid/ansible-project/5302bfca-cb4a-4caa-8c31-b3f4f47d403d%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- 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 post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAF%2BYgi6xRG7BVbOCgqy6RXTgugOy8VUNhtMoR%3DJ64vPGat38fA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
