Hi Dick,
Thanks for pointing, i tried what was given on the examples but still getting same error.
Ansible documentation suggests to use ProxyCommand instrad of delegate_to and i suspect that may be the cause of this issue.
As per documentation, below is the Proxycommand syntax recommended (The network module will now connect to the network device by first connecting to the host specified in ansible_ssh_common_args, which is bastion01 in the above example). But iam not sure what is bastion01 or what i should replace it with in my script.
Below is the playbook output when run with 4 verbosity and error only heitens my above suspicion.
[nxos:vars]
ansible_ssh_common_args='-o ProxyCommand="ssh -W %h:%p -q bastion01"'
I ran the playbook with 4 verbosity and below is the error logs.
File "/usr/lib/python2.7/socket.py", line 557, in create_connection
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
fatal: [R1 -> localhost]: FAILED! => {
"changed": false,
"elapsed": 300,