Ansible Workflow
An Ansible workflow is a powerful automation framework that allows IT teams to execute complex infrastructure and application management tasks. By coordinating these tasks in a structured and repeatable manner, Ansible helps ensure that infrastructure remains consistent and reliable, while reducing manual efforts.
The Ansible workflow would handle tasks like setting up servers, configuring software, and deploying the application code. It helps in streamlining the entire process and ensures consistent results across different environments.
Create an Ansible Workflow​
Subscribe and use StackGuardian's ansible-workflow-step. This template automates Ansible playbooks to manage infrastructure and applications, using SSH authentication and customizable variables for streamlined deployment and configuration.
Following this guide, let's configure a Ansible workflow.
-
In the Orchestrator, navigate to the Workflow Groups tab. Create a new Workflow Group, enter it, and click Create Workflow. Choose "Use Wizard" > "Custom".
-
StackGuardian provides two options:
- Enable VCS settings to connect your code from the Git repository by providing the URL, then click "Next".
- Or simply, click "Next" to proceed without it.
-
Configure the Add New Step:
- Step Name: Name the step,for example
ansible_wf
. - Workflow Step Template: Select
/stackguardian/ansible
. - Workflow Step Template Revision: Choose the latest version, e.g.,
ansible:16
. - Command Override: Leave blank unless customization is needed.
- Playbook Path: Set to
playbook.yml
. - Action: Select
run
. Other options includecheck-diff
anddry-run
. - Capture Output: Ensure this is checked.
- Run Ansible on localhost: Checked by default. For remote execution, provide a list of target machine IPs (space-separated).
- Step Name: Name the step,for example
-
After configuring the step, click Next to fill in the workflow metadata. Finally, click Next to launch the Ansible workflow.
Fig: Ansible Workflow
Dive into Workflow​
StackGuardian workflows provide multiple tabs for monitoring, managing, and refining your deployments. Each tab offers specific insights and actions to optimize your workflow experience.
Overview​
The Overview tab highlights key workflow details, including compliance check results, cost estimations, and resource summaries like drift detection and schedules. It offers a quick snapshot of your workflow's status.
Learn more in the Workflow Overview Guide.
Runs​
The Runs tab lists all executions with real-time status, unique run IDs, and metadata, such as user actions and modification timestamps. Click a Run ID to view detailed logs and execution progress.
Explore the Workflow Runs Guide.
Outputs​
The Outputs tab displays execution results and downloadable artifacts like tfstate.json
. Use key-value pairs to reference outputs in other workflows, making your infrastructure provisioning more dynamic.
See the Workflow Outputs Guide.
Settings​
The Settings tab enables post-creation updates, such as modifying input variables, refining Terraform runtime settings, reordering custom steps, or managing cloud connectors and environment variables.
Learn more in the Workflow Settings Guide.