• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

UnixArena

  • Home
  • kubernetes
  • DevOps
    • Terraform
    • Jenkins
    • Docker
    • Openshift
      • OKD
    • Ansible engine
    • Ansible Tower
      • AWX
    • Puppet
  • Cloud
    • Azure
    • AWS
    • Openstack
    • Docker
  • VMware
    • vCloud Director
    • VMware-Guests
    • Vcenter Appliance 5.5
    • vC OPS
    • VMware SDDC
    • VMware vSphere 5.x
      • vSphere Network
      • vSphere DS
      • vShield Suite
    • VMware vSphere 6.0
    • VSAN
    • VMware Free Tools
  • Backup
    • Vembu BDR
    • Veeam
    • Nakivo
    • Azure Backup
    • Altaro VMBackup
    • Spinbackup
  • Tutorials
    • Openstack Tutorial
    • Openstack Beginner’s Guide
    • VXVM-Training
    • ZFS-Tutorials
    • NetApp cDot
    • LVM
    • Cisco UCS
    • LDOM
    • Oracle VM for x86
  • Linux
    • How to Articles
    • Q&A
    • Networking
    • RHEL7
  • DevOps Instructor-led Training
  • Contact

Ansible Tower / AWX – Creating Workflow Template

March 7, 2019 By Cloud_Devops 1 Comment

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.

  • inventory source syncs
  • job templates
  • project syncs
  • workflow templates

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.

  • Ping the host – Template 1 
  • If we get the ping response, check the filesystem utilization on the host. – Template 2

 

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
Creating New Template – Ansible

 

3. Enter the workflow template information.

Ansible Workflow Template
Ansible Workflow Template

 

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

Start Ansible Tower AWX Workflow
Start Ansible Tower AWX Workflow

 

5. Select the first template for the workflow.

Select the first template for workflow - AWX - Ansible Tower
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
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
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
Execute the workflow template – Ansible AWX Tower

 

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

Workflow test - Ansible AWX
Workflow test – Ansible AWX

 

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

Ansible Tower AWX - Job template details
Ansible Tower AWX – Job template details

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 !!

Filed Under: Ansible Tower, Automation, AWX Tagged With: Ansible, Ansible Tower, AWX

Reader Interactions

Comments

  1. Vijay says

    April 18, 2021 at 11:43 am

    Good Job !! Very good Detailed information really helpful.

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Follow UnixArena

  • Facebook
  • LinkedIn
  • Twitter

Copyright © 2025 · UnixArena ·

Go to mobile version