I am Newbie to Ansible , writing my first playbook.
I can not SSH / PING to network Devices.
leaf-1 | UNREACHABLE! => { "changed": false, "msg": "Authentication failure.", "unreachable": true } leaf-2 | UNREACHABLE! => { "changed": false, "msg": "Authentication failure.", "unreachable": true }
i can PING / SSH to network devices from Ansible server but when i run th playbook , it fails.
No idea if i have to add something in playbook or ansible.cfg . Any Suggestion please ?
You can try to debug the output
Based on the output it appears that Ansible is able to reach the device just not able to authenticate.
I say that because you get the line:
“msg”: “Authentication failure.”,
Where as if Ansible was unable to reach the device at all I would expect something like this:
“msg”: “Failed to connect to the host via ssh: ssh: connect to host 10.0.1.45 port 22: Operation timed out”,
Do you have all of your connection variables for the networking device properly set?
For details, see https://docs.ansible.com/ansible/latest/network/user_guide/network_best_practices_2.5.html#common-inventory-variables
If you need further help please send more info about how your inventory is setup and the commands you are using.
-John