Now that we’ve installed AWX in a simplest possible way (<enter link to awx install post>) we can start using it.
In this post we’ll cover running a simple playbook and basics of handling of AWX.
1. First let’s go over the inventory in AWX. We’ll be adding a host called demohost.test.local to our AWX inventory list. We can add hosts by going to:
Inventories -> Demo inventory -> Hosts -> Click a green plus (+) sign -> enter name and description (while entering name make sure to enter FQDN that is resolvable by your DNS, since AWX is containerized its not pulling hosts from /etc/hosts file):
2. Second task is configuring credentials with which we will access remote hosts.
Credentials -> Demo Credentials -> paste the private key of the key pair you are using to connect to target machine (we are using a default root username)
3. Running a test ping from AWX
Navigate to: Inventories -> Demo inventory -> Hosts -> hostname -> lower checkmark your host -> click “Run Commands”
Afterwords select “Module” to “ping” and click “Launch”. This should be the output:
<insert image test ping output>
4. Running a pre-defined hello_world.yml playbook on the specified host
Navigate to: Projects -> Demo Projects -> Job Templates -> Demo Job Template -> click “Launch”
This should be the output:
Good job! You first playbook was successfully run from AWX!