Ansible common errors encountered during installation

Source: Internet
Author: User

1. Allow command error after installation is complete

traceback  (most recent call last):  file  "/usr/bin/ansible",  line  197, in <module>     (runner, results)  = ( Options, args)   File  "/usr/bin/ansible", line 163, in run     extra_vars=extra_vars,  File  "/usr/lib/python2.6/site-packages/ansible/runner/__ ",  line 233, in __init__    cmd = subprocess. Popen ([' ssh ', '-o ', ' controlpersist '], stdout=subprocess. Pipe, stderr=subprocess. PIPE)   File  "/usr/lib64/python2.6/",  line 639, in __init__     errread, errwrite)   File  "/usr/lib64/python2.6/",  line 1228, in _execute_child    raise child_exceptionoserror:  [Errno 2] No such file or Directory 


# yum Install openssh-clients

2. Error:ansible requires a JSON module appears, none found!

SSH password: | FAILED >> {"FAILED": True, "MSG": "Error:ansible requires a JSON module, nonefound!", "parsed": false}


Python version is too low, either upgrade Python or upgrade the installation Python-simplejson.

3. Connect client server after installation complete error

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. 


On the ansible server, use SSH to log in to the server configured in/etc/ansible/hosts. Then use ansible again to manage will not report the above error! But it would be troublesome to land in such large quantities. Because the default ansible is verified using key, if the server using the password login, use ansible, or modify the ansible.cfg configuration file Ask_pass = True to uncomment, or run the command when you add-K, which means-K,-- Ask-pass ask for SSH password. Re-modify: host_key_checking= false can

4. If the client is not in Know_hosts, the error will be

Paramiko:the authenticity of host ' ' can ' t be established. The Ssh-rsa key fingerprint is397c139fd4b0d763fcffaee346a4bf6b. Is you sure want to continueconnecting (yes/no)?


Need to modify Ansible.cfg's #host_key_checking= false uncomment

5. Appears FAILED = Failed:not a valid DSA private key file

You need to add the parameter-K at the end

6.OPENSSH cannot log in error after upgrade

PAM unable Todlopen (/lib64/security/ openshared Objectfile:no such File or directory


The/etc/pam.d/sshd file will be modified after the SSHRPM upgrade. You need to back up this file before upgrading to log in after the last restore.

7. First time system initialization runtime ansible user key times wrong

Failed: [] =>{"checksum": "f5f2f20fc0774be961fffb951a50023e31abe920", "Failed": True}msg:aborting, Target uses selinux but pythonbindings (libselinux-python) aren ' t installed! Fatal:all hosts have already failed–aborting


# yum Install Libselinux-python-y

This article is from "Smile_ Youth" blog, please be sure to keep this source

Ansible common errors encountered during installation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.