Install Ansible Awx on Ubuntu
Prerequisites:
-
Install Python and Python pip:
sudo apt-get install python python-pip
-
Docker (latest version) installed:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - sudo add-apt-repository \ "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) \ stable" sudo apt-get update sudo apt-get install docker-ce docker-ce-cli containerd.io -y
-
Docker python module installed:
sudo pip install docker
-
Ansible (latest version) installed:
sudo apt-get update sudo apt-get install software-properties-common -y sudo apt-add-repository --yes --update ppa:ansible/ansible sudo apt-get install ansible -y
Installation:
-
Download Ansible Awx
cd /opt git clone https://github.com/ansible/awx cd awx/installer
-
Edit the following values in the “inventory” file and set them with any values desired – not the default – especially the postgres_data_dir (I typically set postgres_data_dir to /opt/pgdocker/):
host_port=80 ... pg_username=awx pg_password=awxpass pg_database=awx pg_port=5432 postgres_data_dir=/tmp/pgdocker ... rabbitmq_password=awxpass rabbitmq_erlang_cookie=cookiemonster ... admin_user=admin admin_password=password ... secret_key=awxsecret
-
Run the installer:
ansible-playbook -i inventory install.yml
Once the ansible-playbook
command completes, the install should be complete and the web interface should be accessible on the remote server on whatever port was specified in the inventory file in Step 2.
Written on February 1, 2019