Open fdervisi opened 3 years ago
@fdervisi If public key is correctly configured on the target host, the underlying library (paramiko/libssh) should use that for authentication and if it were an authentication issue, you would have received an error message such as "ssh connection failed: Failed to authenticate public key: Access denied for 'publickey'. Authentication that can continue: publickey,keyboard-interactive,password"
.
However, based on the error message you shared '[Errno -2] Name or service not known'
, it seems that the hostname 1-Europe-vyOS-AWS-Site1
is not being resolved to 18.159.207.56
. Can you please share the full playbook, your inventory file and the host_vars?
Can you also try to use the following inventory and see if that fixes the connectivity issue?
vyos_inventory.ini:
[vyos]
1-Europe-vyOS-AWS-Site1
[vyos:vars]
ansible_host=18.159.207.56
ansible_connection=ansible.netcommon.network_cli
ansible_network_os=vyos.vyos.vyos
ansible_user:=vyos
SUMMARY
vyos_config works perfectly for vyOS router which are deployed on VMWare or any other hypervisor. However, if I use “VyOS on AWS” it does not work.
The main difference is that you have to use public key to connect to the cloud instances, maybe this is the issue here, but I can't see any packets leaving the Ansible host via tcpdump
In AWS you have to use a public key to
ISSUE TYPE
COMPONENT NAME
ANSIBLE VERSION
COLLECTION VERSION
OS / ENVIRONMENT
CentOS 7
STEPS TO REPRODUCE
This is the working onPrem Playbook:
This is what I put in my inventory file under host_vars:
and this is the error message:
It seams that it does not try to do a ssh connetion, I could not capture anything with tcpdump.