:::: MENU ::::

Install Ansible in CentOS 7 from source

This is the process to install Ansible in CentOS 7 from source, it will create an RMP for ansible and install it.

You have to execute as root

  • install EPEL repository

    yum install epel-release
  • Install some necessary packages
    yum install gcc python python-devel libevent-devel python-setuptools

    yum install PyYAML libyaml python-crypto2.6 python-httplib2 python-keyczar python-pyasn1 python-simplejson python-jinja2 python-paramiko python-six sshpass asciidoc

    yum install make python2-devel rpm-build

    yum install git

  • Clone the code

    git clone git://github.com/ansible/ansible.git --recursive
  • Create RMP and install

    cd ./ansible
    make rpm
    rpm -Uvh ./rpm-build/ansible-*.noarch.rpm

if you want to manage Docker containers with ansible you need to install the API client for Docker python module, you can do that with the next command

yum install python-pip
pip install docker-py

if you have the module already installed maybe you want yo update it

pip install docker-py --upgrade

If you want to manage AWS resources with Ansible you need to install:

* AWS Command Line Interface

curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip"
unzip awscli-bundle.zip
sudo ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws

* Python interface to Amazon Web Services (BOTO)

yum install python-pip
pip install boto

So, what do you think ?