Creating a template in AWX

Templates in AWX pull together all of the other configuration items you have created so farin essence, a template is the AWX definition of all of the parameters you would specify on the command line following the ansible-playbook command.

Let's walk through the process of creating a template so that we can run our playbook:

  1. Click on Templates on the left-hand menu bar.
  2. Click on the green + icon to create a new template.
  3. Select Job Template from the drop-down list.
  4. Give the template a suitable name.
  5. In the INVENTORY field, select the inventory we created earlier in this chapter.
  6. In the PROJECT field, select the project we created earlier.
  7. In the PLAYBOOK field, note that the drop-down list has automatically been populated with a list of all of the viable playbooks that are available in the GitHub repository we specified in our PROJECT definition. Choose lamp_simple_rhel7/site.yml from the list.
  8. Finally, select the credential we defined earlier in the CREDENTIAL field.
  9. Click the green SAVE button.

The end result should look something like the following screenshot, which shows all of the fields filled in:

With those steps complete, we have now completed everything required to run our first ever job from AWX. Hence, we shall proceed to do exactly that in the next section and observe the results.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset