Feedback

Chat Icon

AWX in Action

Ansible Orchestration at Scale

From Git Push to Running PostgreSQL: An End-to-End AWX Workflow
79%

Chaining Deploy and Check Into One Workflow

We created a job that installs PostgreSQL. It already verifies if PostgreSQL is running at the end of its execution. However, to be 100% certain that the deployment was successful, we'll create a workflow that runs the deployment job followed by the verification job in sequence.

Use the following configurations to create the workflow:

  • Name: Use DeployAndCheckPostgreSQL.
  • Description: Use A workflow to deploy and check PostgreSQL.
  • Organization: Use AllOrganization.
  • Inventory: Check the Prompt on launch checkbox.
  • Limit: We can leave this empty.

Save the workflow and add the two job templates to it using the visual editor.

The first job will be the DeployPostgreSQL job template.

Choose `AllInventory` as the inventory when prompted for the inventory.

The second job will be the CheckPostgreSQL job template.

As with the previous job, select `AllInventory` as the inventory when prompted.

We also need to create a survey to prompt the user for the required variables when running the workflow. These will be needed to run the first job template (DeployPostgreSQL). Navigate to the Survey section in the workflow and create a new survey with the following configurations:

Question: Use What is the name of the database?

  • Answer variable name: database_name
  • Answer type: Text
  • Required: Yes

Question: Use What is the name of the database user?

  • Answer variable name: database_user
  • Answer type: Text

AWX in Action

Ansible Orchestration at Scale

Enroll now to unlock all content and receive all future updates for free.