This is the first part of a series on Ansible AWX. In this part we will install Ansible AWX.Code versions used for this post
Note: At the time of writing AWX is not python3 compatible. You will require root/sudo privileges and PIP installed to follow this guide.
AWX is a web GUI based management system for Ansible. AWX is built with a microservices architecture using docker as the container runtime. Redhat provide an installer playbook as part of AWX which can build onto either an openshift cluster or a stand alone docker install. This post will use the stand alone docker method.
Prior to installing AWX we will need to prepare the system.
yum install -y epel-release yum install -y git gettext docker nodejs npm gcc-c++ bzip2
Install the ansible and docker python libraries via PIP to get the latest stable releases.
pip2 install ansible docker
systemctl start docker systemctl enable docker
firewall-cmd --permanent --add-service=http firewall-cmd --permanent --add-service=https firewall-cmd --reload
I dont know the necessary SELinux policies to make AWX function correctly so I am setting the policy to permissive.
To make the changes permanent set the SELINUX variable under /etc/selinux/config to permissive and reboot.
Now that pre-installation tasks are completed lets install AWX.
mkdir /opt/ansible cd /opt/ansible git clone https://github.com/ansible/awx.git
If you followed my guide on upgrading python2/3 then you will need to change the ansible_python_interpreter variable in the /opt/ansible/awx/installer/inventory file from /usr/bin/env python to /usr/local/bin/python2.7
#/opt/ansible/awx/installer/inventory # old localhost ansible_connection=local ansible_python_interpreter="/usr/bin/env python" # new localhost ansible_connection=local ansible_python_interpreter="/usr/local/bin/python2.7"
cd /opt/ansible/awx/installer/ ansible-playbook -i inventory install.yml
Once the playbook is complete you can login to AWX via the web GUI.
Browse to the AWX url http://<awx-hostname-or-ip> and login with the username admin and the password is password. Note: The password can be set in the inventory file with the default_admin_password variable.
The dashboard looks like this
Note: If you see the below when browsing to the URL, wait a few minutes.
Ansible AWX is now installed and ready to be configured. In future posts I will configure AWX for use with network devices.