Templates#
A job template is a definition and set of parameters for running an Ansible job.
Ansible Tower Job Template Documentation Note: Does not perfectly translate to AWX
Templates set up run jobs for your ansible playbooks.
(If you are looking for help using Ansible's template module, find resources here)
Setup#
You will need:
- A Project setup in Tower that has the playbook you'd like to run.
- The inventory you'd like to run the playbook against
- A 'machine' type credential for connecting to your linux hosts. It is recommended you do not use your own credentials for this and instead have a dedicated user.
- NOTE: For jointly managed servers, DevEx will set up the
awx_user
machine credential in Tower and SSH Keys on the servers. We are looking to automate this process, but in the meantime, please emaildevex@umn.edu
with a list of vm's and your CESI unit to have theawx_user
added to additional jointly managed VMs.
- NOTE: For jointly managed servers, DevEx will set up the
Other things to consider are:
- What other credentials do you need to include in your template for your playbook to reference?
- How are you handling secrets in your playbook?
- Do you want to limit the playbook run to specific groups? Add these in 'Limit'
- Do you want to include any tags? Add these in 'Tags'
- Execution Environment (Optional)
- The default EE is our
devex-ee
container. DevEx maintains this execution environment and it comes with many common modules installed. - If you would like to have another module added to the container, please open a ticket by sending an email to
devex@umn.edu
.
Jobs#
A template can be run from the template page, or, start a playbook run job at any point by clicking the rocket ship icon anywhere it is visible.
You can schedule jobs to run using a template through the schedules tab in the template details.
Scheduled Jobs#
Jobs can be scheduled to run from the 'Schedules' tab in a configured template.
Please limit scheduled runs for non-production to once an hour.