How to install Ansible AWX on centos 7

Ansible Tower (formerly ‘AWX’) is a web-based solution that makes Ansible even more easy to use for IT teams of all kinds. It’s designed to be the hub for all of your automation tasks.

Tower allows you to control access to who can access what, even allowing sharing of SSH credentials without someone being able to transfer those credentials. Inventory can be graphically managed or synced with a wide variety of cloud sources. It logs all of your jobs, integrates well with LDAP, and has an amazing browsable REST API. Command line tools are available for easy integration with Jenkins as well. Provisioning callbacks provide great support for autoscaling topologies.

AWX provides a web-based user interface, REST API, and task engine built on top of Ansible. It is the upstream project for Tower, a commercial derivative of AWX.

Installation

1. Setup Requirements

yum install -y epel-release

yum remove python-docker-py
pip install cryptography
pip install jsonschema
pip install docker-compose~=1.23.0
pip install docker –upgrade

yum install -y yum-utils device-mapper-persistent-data lvm2 ansible git python-devel python-pip python-docker-py vim-enhanced

2. Install docker

Configure docker ce stable repository.

yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

Installing docker.

yum install docker-ce -y

Start docker service.

systemctl start docker

Enable docker service.

systemctl enable docker

3. Deploy AWX

Clone AWX repo

git clone https://github.com/ansible/awx.git

Clone commercial logos

cd awx/

git clone https://github.com/ansible/awx-logos.git

Configure AWX

cd installer/

$ vim inventory

awx_official=true

Deploy AWX

ansible-playbook -i inventory install.yml -vv

Check the status

docker ps -a

AWX is ready and can be accessed from the browser.

http://ipaddress:80/

username is “admin” and the password is “password”.

 

8 thoughts on “How to install Ansible AWX on centos 7”

  1. The Feb. 2020 updated procedure would be:

    yum remove python-docker-py
    pip install cryptography
    pip install jsonschema
    pip install docker-compose~=1.23.0
    pip install docker –upgrade
    # You can now run the playbook
    # On CentOS 7 you’ve got to open the firewall too
    firewall-cmd –zone=public –add-port=80/tcp –permanent
    firewall-cmd –reload

      1. No problem 😉 Anyway, “Ansible Tower (formerly ‘AWX’) ” is not correct. Ansible AWX is the upstream version of Ansible Tower – means – AWX is the community edition.
        Just like CentOS and RHEL (or just like any other RedHat Enterprise product with its Community edition)

  2. Hi, I follow the steps. on “pip install docker –upgrade” I get an error message saying docker-compose 1.23.2 has requirement docker 4.0 but you’ll have docker 4.2. then running the installer playbook, it fails saying “Failed to import the required Python library (Docker SDK) on localhost. Please advise.

    1. TLDR; Install as root and if logging in as an unprivileged user use ‘su -‘

      Replying to my own comment. It seems I caused the problem myself by SSHing in as my own user then switching to root (with su rather than su -) so the AWX installer saved some config files under /home/jonny/.aws/axscompose but then moved on to creating the remaining contents under /root/.awx/awxcompose so when the containers started some of the config files were missing so the volumes in the docker compose were created as directories rather than files but of course there was no config content.

      1. Great job on that thing you did @johny.
        TLDR; Install as root and if logging in as an unprivileged user use ‘su -‘

Leave a Reply

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