Site icon UnixArena

Ansible Tower / AWX – Creating Workflow Template

Ansible workflow - AWX Tower

Ansible workflow combines one or more resources links together in a sequence of disparate resources with conditional job results. This allows us to create a template for each task and combine in one workflow based on the results. The following resource could co-exist in workflows.

This article will walk you through to combine to templates in one workflow based on the template result. For test simulation, we will use the following templates.

 

1.Login to Ansible Tower / AWX  as admin or organization admin.

 

2. Navigate to the template tab and click on Add icon (+) and select Workflow.

Creating New Template – Ansible

 

3. Enter the workflow template information.

Ansible Workflow Template

 

4. Click on “start” to combine the existing templates.

Start Ansible Tower AWX Workflow

 

5. Select the first template for the workflow.

Select the first template for workflow – AWX – Ansible Tower

 

6. Select the first template box and click on “+” to add the second template.

Click on Add icon to add second template – Ansible AWX

 

7. Choose the second template from the list and configure the condition. Save the workflow template.

On Success trigger next template – AWX Tower

 

8. Trigger the workflow template. Here you could see that the first template ran successfully and the second template has been triggered.

Execute the workflow template – Ansible AWX Tower

 

9. Here is the final state of the workflow template.

Workflow test – Ansible AWX

 

10. Click on the details link of each template to know more information.

We have successfully created a first Ansible Tower workflow and executed successfully. You could apply the same logic for combining other automation tasks which need to be triggered based on another job.

 

Share it! Comment it !! Be Sociable !!

Exit mobile version