RSA key save Error Resolution in Ansible


If you are also struggling while running ansible-plabook for new hosts and getting error like following, then you have two options. Either connect to each host one by one to save the RSA keys of that host to your ansible server or you can disable host key checking in ansible configuration file. Here is the way to do it

Edit/create either of the following files

 /etc/ansible/ansible.cfg or ~/.ansible.cfg

and add the following to the file.

[defaults]
host_key_checking = False

Error Message before disabling host key checking

fatal: [ios-xe-02]: FAILED! => {"ansible_facts": {"discovered_interpreter_python": "/usr/libexec/platform-python"}, "changed": false, "msg": "paramiko: The authenticity of host '[ios-xe-02]:8181' can't be established.\nThe ssh-rsa key fingerprint is b'b7e974a8cbf96d464f7be3e12a86d265'."}



Comments

Popular posts from this blog

Anyconnect SSL-Client VPN with Self-signed Certificate on Cisco ASA

Filtering Routes in BGP using Route-maps and Prefix-list

Open Shortest Path First (OSPF)

IKEv2 IPsec Site-to-Site VPN configuration on Cisco ASA 8.4(x)

IPsec VPN as a Backup for Point-to-Point Link using IP SLA

Border Gateway Protocol (BGP)

Cisco ASA Active/Active Failover Configuration

Bypassing Proxy Server in Google Chrome

Cisco ASA Active/Standby Failover Configuration