How to install Ansible AWX on Debian 10 (Buster)

Ansible AWX is a free and open source Ansible management tool designed to provide system administrators and developers with an easy-to-use, intuitive and powerful web-based user interface for managing Ansible scripts, secrets, manifests and Automate cron jobs. interval. This guide explains how to install Ansible AWX on a Debian 10 (Buster) Linux system.

Step 1: Install Ansible on Debian

Update your APT index.

sudo apt update

Add Ansible APT repository.

echo "deb bionic main" | sudo tee /etc/apt/sources.list.d/ansible.list
sudo apt -y install gnupg2
sudo apt-key adv --keyserver --recv-keys 93C4A3FD7BB9C367

Use the following command to install the latest version of Ansible.

sudo apt update
sudo apt install -y ansible

Confirm the installation by checking the available versions.

$ ansible --version
ansible 2.8.6
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/home/debian/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/dist-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.16 (default, Apr  6 2019, 01:42:57) [GCC 8.3.0]

Step 2: Install Docker and Docker Compose

All Ansible AWX services run in Docker containers. To do this, you need to install the Docker engine.

Install Docker on Debian 10

Use the following command to confirm the installation of the Docker version.

~$ docker info
 Debug Mode: false

 Containers: 0
  Running: 0
  Paused: 0
  Stopped: 0
 Images: 0
 Server Version: 19.03.4
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Native Overlay Diff: true
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: b34a5c8af56e510852c35414db4c1f4fa6172339
 runc version: 3e425f80a8c931f88e6d94a8c831b9d5aa481657
 init version: fec3683
 Security Options:
   Profile: default
 Kernel Version: 4.19.0-5-cloud-amd64
 Operating System: Debian GNU/Linux 10 (buster)
 OSType: linux
 Architecture: x86_64
 CPUs: 2
 Total Memory: 3.857GiB
 Name: deb10
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
 Live Restore Enabled: false

Install Docker Compose:

How to install the latest Docker Compose on Linux

Docker Compose details.

$ docker-compose version
docker-compose version 1.24.1, build 4667896b
docker-py version: 3.7.3
CPython version: 3.6.8
OpenSSL version: OpenSSL 1.1.0j  20 Nov 2018

Step 3: Install Node.js and NPM on Debian

Install the Node.js and NPM packages using the apt command.

sudo apt install -y nodejs npm
sudo npm install npm --global

Step 4: Install Ansible AWX on Debian 10 (Buster)

Before we install Ansible AWX on Debian 10 (Buster), please install some required Ansible packages and modules.

sudo apt -y install python3-pip git pwgen vim  python3-docker 
sudo pip3 install requests==2.14.2

Update the default Python version.

sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 2

Install the docker-compose Python module that matches your version of Docker Compose.

$ docker-compose version
docker-compose version 1.24.1, build 4667896
docker-py version: 3.7.3
CPython version: 3.6.8
OpenSSL version: OpenSSL 1.1.0j  20 Nov 2018

$ sudo pip3 install docker-compose==1.24.1

Copy the AWX source code from GitHub using the following command Git command.

sudo su -
git clone --depth 50

Go to AWX installer directory

Since you need to execute ansible scripts under the installer directory, first navigate to that directory.

cd awx/installer/

Check the manifest file in the awx directory, you can customize it as needed:

$ nano inventory

Generate AWX key

$ pwgen -N 1 -s 30

Modify in stock Your settings have the files set correctly. Minimum setting:


Executive script

Install Ansible AWX on Debian 10 using Ansible-script name is install.yml.

ansible-playbook -i inventory install.yml

Install the output and check if there is error Message.

To use Docker ps Command to get a list of running containers.

How to install Ansible AWX on Debian 10 (Buster)

Step 5: Visit the Ansible AWX Information Center

The web portal can be accessed via hostip_or_hostname. You will get a welcome dashboard similar to the following.

How to install Ansible AWX on Debian 10 (Buster)

Sign in Admin The user account password set in the manifest file. After authentication, you will enter the AWX management console.

How to install Ansible AWX on Debian 10 (Buster)

Step 6: Update Ansible AWX on Debian 10

To update, change the working directory to the AWX home directory.

cd ~/.awx/awxcompose/

Stop the Docker service.

# docker-compose stop
Stopping awx_task      ... done
Stopping awx_web       ... done
Stopping awx_rabbitmq  ... done
Stopping awx_postgres  ... done
Stopping awx_memcached ... done

Pull the Docker image again.

# docker-compose pull
Pulling rabbitmq  ... done
Pulling memcached ... done
Pulling postgres  ... done
Pulling web       ... done
Pulling task      ... done

Start the AWX docker service.

# docker-compose up --force-recreate -d
Recreating awx_postgres  ... done
Recreating awx_rabbitmq  ... done
Recreating awx_memcached ... done
Recreating awx_web       ... done
Recreating awx_task      ... done

Related guides.

Install Ansible AWX on Ubuntu

How to install and configure Ansible Tower on CentOS 7

Install Ansible AWX on CentOS 7 / Fedora

Semaphores-manage Ansible tasks from the web UI