Overview
In this article, we will go through how to execute an Ansible Tower template on an already deployed virtual machine.
Considerations
- Have licensed and configured the Ansible Tower module
NOTE: The Ansible Tower CM Framework plugin (ATCMF) Does not contain the Day 2 workflow - Have VMs deployed you want to run this against
Requirements
- If using Static Inventory
- VM must have been deployed with an Ansible Tower property group and Day 1 actions
- If using Dynamic Inventory
- Ensure the VM has been dynamically added into the inventory prior to running day 2 operations
- Day 2 operations must be in the same inventory as the original deployment
- Not having the machine in the inventory will result in our workflow executing and running without error but the Ansible Tower job failing with a message similar to
- The user performing the action must have the appropriate entitlement granted for this to work
Procedure
Execute the Ansible job for a deployed VM
- From your deployment tab in vRA, locate the VM you want to run a playbook on and click on the deployment name
- From the Component List, Click on the server name and then the Cog next to the name (1), then click on Execute Ansible Tower Job Template (2)
- Select the Ansible Tower Endpoint
- Optionally you can Filter projects by team and/or by projects. I will filter by Projects
- You can choose a job template from the list or enter the template name. I will select a template from the list and click the arrow to move it for deployment
- Set Extra Vars if/as required
- Click on Submit
- In your deployments you will now see Execute Ansible Job Template running against your VM
- You will see in Ansible Tower your job will run.
Additional information
SovLabs Ansible Tower Module : http://docs.sovlabs.com/latest/vRA/7.6/modules/configuration-mgmt/ansible-tower/
0 Comments