Traceback (most recent call last):
File "/usr/bin/ansible", line 197, in <module>
(runner, results) = cli.run(options, args)
File "/usr/bin/ansible", line 163, in run
extra_vars=extra_vars,
File "/usr/lib/python2.6/site-packages/ansible/runner/__init__.py", line 233, in __init__
cmd = subprocess.Popen(['ssh','-o','ControlPersist'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
File "/usr/lib64/python2.6/subprocess.py", line 639, in __init__
errread, errwrite)
File "/usr/lib64/python2.6/subprocess.py", line 1228, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
解决方法:
# yum install openssh-clients
2.出现Error: ansible requires a json module, none found!
FAILED => Using a SSH password insteadof a key is not possible because Host Key checking is enabled and sshpass doesnot support this. Please add this host'sfingerprint to your known_hosts file to manage this host.
paramiko: The authenticity of host '192.168.24.15'can't be established.
The ssh-rsa key fingerprint is397c139fd4b0d763fcffaee346a4bf6b.
Are you sure you want to continueconnecting (yes/no)?
解决方法:
需要修改ansible.cfg的#host_key_checking= False取消注释
5.出现FAILED => FAILED: not a valid DSA private key file
解决方法:
需要你在最后添加参数-k
6.openssh升级后无法登录报错
PAM unable todlopen(/lib64/security/pam_stack.so): /lib64/security/pam_stack.so: cannot openshared object
file: No such file or directory