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
and add the following to the file.
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
Post a Comment