As I continue to push forward the use of AWX in our infrastructure, there is continued need to test what we are producing. Much like any other kind of development, sometimes we need a local environment to test something. This came up recently for me in AWX because I was testing a role that modified the AWS Task container in order to provide enhanced functionality. I wrote the following little shell provisioner that gets AWX up and running quickly for testing.

   config.vm.provision "shell", inline: <<-SHELL
     yum install -y epel-release 
     yum install -y wget vim git ansible python2-pip
     yum install -y docker-compose docker
     systemctl start docker
     pip install docker
     git clone https://github.com/ansible/awx.git
     cd awx/installer && ansible-playbook -i inventory install.yml
   SHELL

This will get AWX up and running in Docker with all the default settings and credentials. Make sure to forward port 80 of your VM to something on localhost so you can access the UI.