Understanding the Approval Node in AAP or AWX

AWX is an opensource web application that provides a unified interface to users for managing their Ansible playbook, inventories etc. It also serves as the upstream project for the RedHat Ansible Automation Platform. Its is designed to help IT teams to streamline and automate their configuration managements, deployment of different applications and other operational tasks. AWX or AAP gives an UI to user to manager and execute playbooks through a web GUI, offering different capabilities like role based access control, job scheduling and graphical workflow creation. 

Approval Node and its importance in Automation Workflows

An approval node in AWX or AAP is a special type of control node within workflow templates to introduce a manual checkpoint in the automated process. When a workflow execution reaches to an approval node, it pauses an execution and waits for a designated user or team to review and approve the action before moving to next step.

Approval nodes plays a crucial for scenarios where human oversight is necessary to ensure that automated actions align with the business polices, security standard or other compliance requirements. It provides a mechanism to enforce checks and balances within the automation workflows and mitigating the risk of unintended changes or actions.

Creating a workflow with an approval node

Creation of workflow with approval node will involves several steps. In this blog will walk you through the process of setting up a workflow, adding an approval node and configuring it.

In AAP or AWX click on templates > Add > Select “Workflow Template”

Then Enter the details like Workflow template name, org and inventory

After that you will get an option to create a workflow by clicking on “start”. When adding a node we need to select an “Approval” as a node type

Once the approval node is added we can add other normal Job Template or workflow template node as per the requirement.

Now, we need to set up an access for this workflow template that who can approve it apart from admin user, for that we need to click on “Access” in the Workflow Template only and add a user which can be a approver for the workflow. To add another user we need to click on “Add”.

Here we can select the team of users or an indivual user as an approver. For this blog I will be selecting “Users”.

After selection users it will show the list of users which are already present in the AAP/AWX, we need to select from that list and click on next.

In this section we need to define the access of an user for this particular workflow template like it will have an admin, read, execute or approve access. In our case we need to give an “approve” access only

Once the access has been added it will show it like this.

Now, its time to test the execution and how it actually works. I triggered the workflow and now its waiting for an approver to approve it and it will send a notification to approver as per the notification which is setup in AAP/AWX. By default it will give a notification in web ui itself.

I logged in with “Nikhil” user where the job is waiting for an approval, 

Once the approver approves it, Flow moves to next job template.

By following these steps, you can create a workflow that includes an approval node. This setup helps maintain control, compliance and accountability within in our automation process.

Benefits of using approval nodes in automation workflow:

  • Enhanced Control: Approval nodes give administrators and stakeholders the ability to review and approve critical steps in a workflow, ensuring that only authorized changes are implemented.
  • Compliance and Governance: By incorporating approval nodes, organizations can ensure that their automation workflows adhere to internal policies, regulatory requirements, and industry standards.
  • Risk Mitigation: Manual approvals help prevent errors and unintended consequences by adding a layer of verification before proceeding with potentially impactful actions.
  • Accountability and Auditing: Approval nodes provide a clear record of who approved specific actions, facilitating transparency and accountability within the automation process.

Real-World Use Case

Scenario: Approval for Production Deployment

Imagine a scenario where your development team wants to automate the deployment of an application. However, you need to ensure that any changes to the production environment are reviewed and approved by a senior engineer to prevent potential issues.

Workflow Steps:
Initial Deployment:
  • The workflow starts with deploying the application to a staging environment using a job template.
Approval Node:
  • An approval node is placed after the staging deployment. The workflow pauses and sends an approval request to the senior engineer.
Manual Review:
  • The senior engineer reviews the staging environment to ensure everything is functioning correctly and that the changes meet quality standards.
Post-Approval Deployment:
  • Once the senior engineer approves the changes, the workflow resumes and deploys the application to the production environment.
Benefits:
  • Controlled Deployment: Ensures that all changes are reviewed before going live.
  • Risk Mitigation: Reduces the risk of introducing unverified changes to production.
  • Accountability: Tracks who approved the changes, providing an audit trail.

By incorporating approval nodes in your workflows adds a crucial layer of control and oversight, ensuring that crictical actions are reviewed and approved before the execution. It enhances the reliability and safety of your automation processes.

Try integrating approval nodes into your workflows to experience the benefits of controlled automation. Whether you’re managing deployments, configuration or any other operational tasks, approval nodes can help you maintain the right balance between automation and human oversight.

Leave a Comment

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

Scroll to Top