AWX in Dockerdesktop on Windows 10

Requirements

Assumptions are that you actually already are running some things on your local development systems

You may already have a venv running on your Ubuntu host if not basically create it like this:

mkdir ~/virtualenvs
cd ~/virtualenvs
python3 -m venv ansible
source ~/virtualenvs/ansible/bin/activate
pip3 install wheel
pip3 install ansible

For more info see Ansible Python Virtual Env

Install AWX from your WSL2 Ubuntu host into Docker containers

source ~/virtualenvs/ansible/bin/activate
pip3 install docker docker-compose
git clone https://github.com/ansible/awx.git
cd awx

Checkout the latest stable branch:

tag=$(git describe --tags `git rev-list --tags --max-count=1`)
git checkout tags/$tag -b $tag-branch

Start the installer

cd installer
ansible-playbook -i inventory install.yml

Troubleshoot

View the logs of your docker container:

docker logs -f awx_task
^C

Restart your docker containers:

cd ~/.awx/awxcompose
docker-compose down
docker-compose up -d

Continue with AWX

I personally didn’t like clicking around in project in AWX so I started to automate the setup of AWX also:

comments powered by Disqus