Now that we have our playbook in place, we can add our host inventory information to the production file:
box ansible_host=10.20.30.50.nip.io
[awx]
box
[awx:vars]
ansible_connection=ssh
ansible_user=vagrant
ansible_private_key_file=~/.ssh/id_rsa
host_key_checking=False
Finally, we can add the following to the site.yml file, and we should be good to run our installation:
---
- hosts: awx
gather_facts: true
become: yes
become_method: sudo
vars_files:
- group_vars/common.yml
roles:
- roles/docker
- roles/awx
To get Ansible AWX up and running, we need to execute one of the following commands to launch the Vagrant box:
$ vagrant up
$ vagrant up --provider=vmware_fusion
Then, the following command will run the playbook:
$ ansible-playbook -i production site.yml
It will take a few minutes to run through the playbook; once complete, you should see something like this:
Opening your browser and going to http://10.20.30.50.nip.io/ should show you the following message:
Keep the page open and, after a few minutes, you should see a login prompt.