Hello Team,
I am trying to connect and run few commands in destination hosts . In between destinatino hosts jump server there.
Can you help on this.
Ansible.cfg config
[defaults]:
inventory = /etc/ansible/hosts
ansible_python_interpreter=/usr/bin/python3
host_key_checking = no
look_for_keys = False
.ssh config
sh-3.2# cat /Users/veda/.ssh/config
Host tot
Hostname x.x.x.x
User veda1
IdentityFile /Users/veda/.ssh/id_rsa
IdentitiesOnly yes
[epc]
y.y.y.y
Hosts file
[test:vars]
ansible_connection=network_cli
use_persistent_connections=yes
ansible_port=22
ansible_ssh_port=22
ansible_network_os=ios
ansible_user=ravi
#ansible_ssh_user=ravi
#ansible_ssh_password=xxxx
ansible_password=xxxx
Getting this error
“msg”: “[Errno None] Unable to connect to port 22 on y.y.y.y” Looks like playbook trying to run root user