为iOS运行network_cli时,RSA密钥出现问题。
我通过ansible-playbook收到以下错误:
fatal: [XXX.XXX.XXX.XXX]: FAILED! => {
"msg": "not a valid RSA private key file"
(yml标头)
- hosts: [HOSTS]
gather_facts: yes
connection: network_cli
(托管vars)
[HOSTS:vars]
ansible_network_os=ios
ansible_ssh_private_key_file=/root/.ssh/id_rsa
ansible_ssh_host_keyauto_add=yes
更多错误详细信息:
完整的回溯是: 追溯(最近一次通话): 在开始的文件“ / bin / ansible-connection”,第106行 self.connection._connect() _connect中的文件“ /usr/lib/python2.7/site-packages/ansible/plugins/connection/network_cli.py”,第307行 ssh = self.paramiko_conn._connect() _connect中的文件“ /usr/lib/python2.7/site-packages/ansible/plugins/connection/paramiko_ssh.py”,第249行 self.ssh = SSH_CONNECTION_CACHE [cache_key] = self._connect_uncached() _connect_uncached中的第365行的文件“ /usr/lib/python2.7/site-packages/ansible/plugins/connection/paramiko_ssh.py” 引发AnsibleConnectionFailure(msg) AnsibleConnectionFailure:不是有效的RSA私钥文件