How to Install and Configure ‘Ansible’ Automation Tool for IT Management – Part 1

Best Affordable Linux and WordPress Services For Your Business
Outsource Your Linux and WordPress Project and Get it Promptly Completed Remotely and Delivered Online.

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Get your own self-hosted blog with a Free Domain at ($3.45/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Babin Lonston

I'm Working as a System Administrator for last 10 year's with 4 years experience with Linux Distributions, fall in love with text based operating systems.

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

49 Responses

  1. Vitor hugo says:

    Hi, missing only Chapter 4, when I click does not open the link for the rest of the tutorial.

  2. Rahul S says:

    Hi, I am getting below error when I try to install ansible on Linux.

    Error: Package: python-paramiko-2.1.1-0.4.el7.noarch (epel)
               Requires: python2-pyasn1
    Error: Package: python-paramiko-2.1.1-0.4.el7.noarch (epel)
               Requires: python-cryptography

    Can someone please help..

  3. Manikandan says:

    Error: Package: ansible- (epel)
    Requires: python-jinja2

    Ansible installation issue
    Error: Package: python-paramiko-2.1.1-0.2.el7.noarch (epel)
    Requires: python-cryptography
    You could try using –skip-broken to work around the problem
    You could try running: rpm -Va –nofiles –nodigest

    when I have tried to install the ansible, after enable the repo also I am getting the following error

    • Ravi Saive says:


      I think you first install python-cryptography manually using PIP tool as shown.

      $ sudo pip install pycrypto
  4. Sagar says:

    Faced some issues while installing Ansible in linux. Got resolved by installing below packages.

    error: Failed dependencies:
    python-httplib2 is needed by ansible-
    python-jinja2-26 is needed by ansible-
    python-keyczar is needed by ansible-
    python-setuptools is needed by ansible-
    python-six is needed by ansible-
    sshpass is needed by ansible-

    Downloaded separately all the rpms from and installed.

  5. Sagar says:

    Issue got resolved by below command after keygen in host1


    then run the ansible
    ansible -m command -a “df -h ” webservers

  6. Ndukaku Onyekachi says:

    I was not able to install ansible in my REDHAT 7, after running the below commands;

    $ sudo yum install ansible -y
    $ wget
    $ sudo rpm -ivh epel-release-7-10.noarch.rpm

    Return output

    Loaded plugins: amazon-id, rhui-lb, search-disabled-repos
    epel/x86_64/metalink                                                                                                                                                                      |  18 kB  00:00:00
    epel                                                                                                                                                                                      | 4.3 kB  00:00:00
    (1/3): epel/x86_64/group_gz                                                                                                                                                               | 170 kB  00:00:00
    (2/3): epel/x86_64/updateinfo                                                                                                                                                             | 840 kB  00:00:00
    (3/3): epel/x86_64/primary_db                                                                                                                                                             | 4.8 MB  00:00:00
    No package ansible available.
  7. Isuru Wickramarathne says:

    #8 command should be -> ansible all -m ping

  8. Rajesh Kathar says:

    Hello Team,

    On Production server, We can’t provide internet access to server. I have download ansible.tar file. Can you suggest me the steps to install ?

    Rajesh kathar

  9. Arun says: | UNREACHABLE! => {
    “changed”: false,
    “msg”: “Failed to connect to the host via ssh: Permission denied (publickey,password).\r\n”,
    “unreachable”: true
    } | UNREACHABLE! => {
    “changed”: false,
    “msg”: “Failed to connect to the host via ssh: ssh: connect to host port 22: Connection timed out\r\n”,
    “unreachable”: true

    • Shivaji Thanneeru says:

      I got the same error. I fixed it by
      1) installing python on remote servers
      2) Adding the following line to /etc/ansible/hosts ( my user is shivaji )

    • @Arun,

      Have you tried ssh-add, ssh-agent?

      Babin Lonston

    • prashantcruise says:

      my be your network (server )is not reachable or you havent copy ssh-key for password less login or defined user havent any key to that server.

  10. Kamil Monticolo says:

    Hi, I created script that installa Ansible on SuSe SLES11

Leave a Reply to Kamil Monticolo Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.