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

Page 1 of 212

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.95/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...

44 Responses

  1. 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-2.4.1.0-2.el6.noarch
    python-jinja2-26 is needed by ansible-2.4.1.0-2.el6.noarch
    python-keyczar is needed by ansible-2.4.1.0-2.el6.noarch
    python-setuptools is needed by ansible-2.4.1.0-2.el6.noarch
    python-six is needed by ansible-2.4.1.0-2.el6.noarch
    sshpass is needed by ansible-2.4.1.0-2.el6.noarch

    Downloaded separately all the rpms from rpmfind.net and installed.

  2. Sagar says:

    Issue got resolved by below command after keygen in host1

    ssh-copy-id

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

  3. 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 http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-10.noarch.rpm
    $ 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.
    
  4. Isuru Wickramarathne says:

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

  5. 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 ?

    Regards,
    Rajesh kathar

  6. Arun says:

    192.168.0.25 | UNREACHABLE! => {
    “changed”: false,
    “msg”: “Failed to connect to the host via ssh: Permission denied (publickey,password).\r\n”,
    “unreachable”: true
    }
    192.168.4.23 | UNREACHABLE! => {
    “changed”: false,
    “msg”: “Failed to connect to the host via ssh: ssh: connect to host 192.168.4.23 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 )
      ansible_user=shivaji
      [web-servers]
      192.168.1.200
      192.168.1.201

    • @Arun,

      Have you tried ssh-add, ssh-agent?

      Regards,
      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.

  7. Kamil Monticolo says:

    Hi, I created script that installa Ansible on SuSe SLES11
    https://github.com/kmonticolo/Ansible-on-SLES11

Got something to say? Join the discussion.

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