From Git Push to Running PostgreSQL: An End-to-End AWX Workflow
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 launchcheckbox. - 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.
The second job will be the CheckPostgreSQL job template.
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 ScaleEnroll now to unlock all content and receive all future updates for free.
