>
> HI Ali,
>

I added gather_facts: yes but no luck

---
- hosts: all
  gather_facts: yes


  tasks:


  - name: vikram
#    debug: msg="vikram"
    #debug: msg={{ hostvars[item] }}
    debug: msg={{ hostvars[item]['ansible_default_ipv4']['address'] }}
    with_items:
     - "{{ groups['all'] }}"




*Output:*














































*root@installterinceptionvm2:/home/ubuntu/ansible# ansible-playbook -i 
inventory/inventory test1.yml PLAY [all] 
*********************************************************************TASK 
[setup] 
*******************************************************************fatal: 
[openam-instance]: UNREACHABLE! => {"changed": false, "msg": "Failed to 
connect to the host via ssh: Connection timed out during banner 
exchange\r\n", "unreachable": true}fatal: [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}fatal: [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}fatal: [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}fatal: [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}fatal: [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}fatal: [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}fatal: [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}fatal: [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}fatal: [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}ok: [inception]fatal: [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}fatal: [opendj-instance]: 
UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host 
via ssh: Connection timed out during banner exchange\r\n", "unreachable": 
true}TASK [vikram] 
******************************************************************fatal: 
[inception]: 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/test1.yml': line 7, 
column 5, but may\nbe elsewhere in the file depending on the exact syntax 
problem.\n\nThe offending line appears to be:\n\n\n  - name: vikram\n    ^ 
here\n"}        to retry, use: --limit 
@/home/ubuntu/ansible/test1.retryPLAY RECAP 
*********************************************************************edge-instance-1
 
: ok=0    changed=0    unreachable=1    failed=0edge-instance-2 : ok=0   
 changed=0    unreachable=1    failed=0inception      : ok=1    changed=0   
 unreachable=0    failed=1kuberenetes-master-1 : ok=0    changed=0   
 unreachable=1    failed=0kuberenetes-master-2 : ok=0    changed=0   
 unreachable=1    failed=0kuberenetes-master-3 : ok=0    changed=0   
 unreachable=1    failed=0kuberenetes-node-1 : ok=0    changed=0   
 unreachable=1    failed=0kuberenetes-node-2 : ok=0    changed=0   
 unreachable=1    failed=0kuberenetes-node-3 : ok=0    changed=0   
 unreachable=1    failed=0kuberenetes-node-4 : ok=0    changed=0   
 unreachable=1    failed=0kuberenetes-node-5 : ok=0    changed=0   
 unreachable=1    failed=0openam-instance : ok=0    changed=0   
 unreachable=1    failed=0opendj-instance : ok=0    changed=0   
 unreachable=1    failed=0*

-- 
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/20416dcc-1556-4401-9276-433ddf3a1683%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to