Ansible AWX
ISD has the ability to perform Ansible AWX configuration management tasks as part of ISD pipelines.
AWX is a web-based solution that makes Ansible more comfortable to use. It is designed to be the hub for all automation tasks. AWX browser REST API allows you to control access, graphically manage or sync inventory with a wide variety of cloud sources, log all your jobs, and integrate well with Lightweight Directory Access Protocol.
Ansible AWX Stage consists of the following eleven stages:
Configure Ansible AWX
GitOps style configuration:
Execute the following steps to configure Ansible AWX custom stage in GitOps style:
Edit the orca-local.yaml file in the path “default/profiles/orca-local.yaml” from the GitHub repo and update the below configuration
Provide the AWX URL and token in authorization section in base64 encoded format
Copy the orca-local.yaml file from the below. https://raw.githubusercontent.com/opsmx-public/Ansible-AWX-custom-stage/master/orca-local.yaml
Non-GitOps style configuration
Execute the following steps to configure Ansible AWX custom stage in Non-GitOps style:
Enter into the halyard pod as below mentioned.
Edit the orca-local.yaml file in the path “~/default/profiles/orca-local.yaml” from the GitHub repo and update the below configuration.
Copy the orca-local.yaml file from the below. https://raw.githubusercontent.com/opsmx-public/Ansible-AWX-custom-stage/master/orca-local.yaml
Ansible AWX - Create Instance Group
Create an Instance Group from the stage by providing the details with detailed information in the summary field.
To add “Ansible AWX - Create Instance Group” stage to your pipeline follow the steps below:
Select your application and click “Pipeline builder” and click “Add Stage” and then select “Ansible AWX - Create Instance Group” stage from the drop-down menu as shown below.
Now the configuration screen appears to provide the required parameters.
Provide the following parameters on the above configuration screen:
Fail Fast HTTP Statuses: Comma-separated HTTP status codes (4xx or 5xx) that will cause this webhook stage to fail without retrying.
Credential Id: Credential id. Leave it blank if not needed
Is Container Group: True or False
Name: Name of this instance group.
Pod Spec Override: Provide the override.
Policy Instance List: List of exact-match Instances that will be assigned to this group Provide value in "" and multiple values by comma separated
Policy Instance Minimum: Static minimum number of Instances that will be automatically assigned to this group when new instances come online.
Policy Instance Percentage: Minimum percentage of all instances that will be automatically assigned to this group when new instances come online.
Ansible AWX - Create Job Template
Create a Job Template from the stage by providing the details with detailed information in the summary field.
To add “Ansible AWX - Create Job Template” stage to your pipeline follow the steps below:
Select your application and click “Pipeline builder” and click “Add Stage” and then select “Ansible AWX - Create Job Template” stage from the drop-down menu as shown below.
Now the configuration screen appears to provide the required parameters
Provide the following parameters on the above configuration screen:
Fail Fast HTTP Statuses: True/False
Allow Callbacks: True/False
Allow Simultaneous: True/False
Ask Credential on Launch: True/False
Ask Diff Mode on Launch: True/False
Ask Inventory On Launch: True/False
Ask Job Type on Launch: True/False
Ask Limit on Launch: True/False
Ask Scm Branch on Launch: True/False
Ask Skip Tags On Launch: True/False
Ask Tags on Launch: True/False
Ask Variables on Launch: True/False
Ask Verbosity on Launch: True/False
Become Enabled: True/False
Description: Description about job template
Diff Mode: If enabled, textual changes made to any templated files on the host are shown in the standard output.
Execution Environment: True/False
Extra Vars: True/False
Forks: True/False
Host Config Key: True/False
Inventory: True/False
Job Slice count: True/False
Job Tags: True/False
Job Type: True/False
Limit: True/False
Playbook: Provide the yaml file
Project: Give the project name
Scm Branch: Branch to use in job run. Project default used if blank. Only allowed if project allow_override field is set to true
Timeout: The amount of time (in seconds) to run before the task is canceled.
Use Fact Cache: If enabled, Tower will act as an Ansible Fact Cache Plugin; persisting facts at the end of a playbook run to the database and caching facts for use by Ansible.
Webhook_service: Service that webhook requests will be accepted from (eg: GitHub/GitLab)
Webhook Credential: Personal Access Token for posting back the status to the service API
Ansible AWX - Create Project
Create a Project Configuration from the stage by providing the details with detailed information in the summary field.
To add “Ansible AWX: Create Project” stage to your pipeline follow the steps below:
Select your application and click “Pipeline builder” and click “Add Stage” and then select “Ansible AWX: Create Project” stage from the drop-down menu as shown below.
Now the configuration screen appears to provide the required parameters.
Provide the following parameters on the above configuration screen:
Fail Fast HTTP Statuses: Comma-separated HTTP status codes (4xx or 5xx) that will cause this webhook stage to fail without retrying
Allow Override: Allow changing the SCM branch or revision in a job template that uses this project
Credential: Need to provide the credential
Custom Virtualenv: Local absolute file path containing a custom Python virtualenv to use
Description: Description of the project
Local Path: Local path (relative to PROJECTS_ROOT) contains playbooks and related files for this project
Name: Name of the project
Organization: The organization used to determine access to this template
Scm Branch: Specific branch, tag or commit to checkout
Scm Clean: Discard any local changes before syncing the project
Scm Delete on Update: Delete the project before syncing
Scm Refspec: For git projects, an additional refspec to fetch
Scm Type: Specifies the source control system used to store the project
Scm Update Cache Timeout: The number of seconds after the last project update ran that a new project update will be launched as a job dependency
Scm Update on Launch: Update the project when a job is launched that uses the project
Scm Url: The location where the project is stored
Timeout: The amount of time (in seconds) to run before the task is
Ansible AWX - Get List of Job Templates
This stage to list the job templates available by providing the details with detailed information in the summary field.
To add “Ansible AWX - Get List of Job Templates” stage to your pipeline follow the steps below:
Select your application and click “Pipeline builder” and click “Add Stage” and then select “Ansible AWX - Get List of Job Templates” stage from the drop-down menu as shown below.
Now the configuration screen appears to provide the required parameters.
Provide the following parameters on the above configuration screen:
Fail Fast HTTP Statuses: Comma-separated HTTP status codes (4xx or 5xx) that will cause this webhook stage to fail without retrying
Ansible AWX - Invoke a Job Templates
This stage to invoke job template in Ansible AWX by providing the details with detailed information in the summary field.
To add “Ansible AWX - Invoke a Job Templates” stage to your pipeline follow the steps below:
Select your application and click “Pipeline builder” and click “Add Stage” and then select “Ansible AWX - Invoke a Job Templates” stage from the drop-down menu as shown below.
Now the configuration screen appears to provide the required parameters.
Provide the following parameters on the above configuration screen:
Fail Fast HTTP Statuses: Comma-separated HTTP status codes (4xx or 5xx) that will cause this webhook stage to fail without retrying
Job Template ID: Provide job template id
Ansible AWX - Name of Instance Group
This stage to update the name of an instance group in Ansible AWX by providing the details with detailed information in the summary field.
To add “Ansible AWX - Name of Instance Group” stage to your pipeline follow the steps below:
Select your application and click “Pipeline builder” and click “Add Stage” and then select “Ansible AWX - Name of Instance Group” stage from the drop-down menu as shown below.
Now the configuration screen appears to provide the required parameters.
Provide the following parameters on the above configuration screen:
Change Name: To what you need to change
Current Name : Name of the instance group which exists
Ansible AWX - Update Credential of Instance Group
This stage to update the credential of an instance group in Ansible AWX by providing the details with detailed information in the summary field.
To add “Ansible AWX - Update Credential of Instance Group” stage to your pipeline follow the steps below:
Select your application and click “Pipeline builder” and click “Add Stage” and then select “Ansible AWX - Update Credential of Instance Group” stage from the drop-down menu as shown below.
Now the configuration screen appears to provide the required parameters.
Provide the following parameters on the above configuration screen:
Credential Id: Id of the credential to which you want to change
Name : Name of the instance group which exis
Ansible AWX - Update Instance List of Instance Group
This stage to update instance list an instance group in Ansible AWX by providing the details with detailed information in the summary field.
To add “Ansible AWX - Update List of Instance Group” stage to your pipeline follow the steps below:
Select your application and click “Pipeline builder” and click “Add Stage” and then select “Ansible AWX - Update List of Instance Group” stage from the drop-down menu as shown below.
Now the configuration screen appears to provide the required parameters.
Provide the following parameters on the above configuration screen:
Name : Name of this instance group
Policy Instance List: List of exact-match Instances that will be assigned to this group. Provide value in "" and multiple values by comma separated
Ansible AWX - Update Pod Spec Override of Instance Group Configuration
This stage to update pod spec override of an instance group in Ansible AWX by providing the details with detailed information in the summary field.
To add “Ansible AWX - Update Pod Spec Override of Instance” stage to your pipeline follow the steps below:
Select your application and click “Pipeline builder” and click “Add Stage” and then select “Ansible AWX - Update Pod Spec Override of Instance” stage from the drop-down menu as shown below.
Now the configuration screen appears to provide the required parameters.
Provide the following parameters on the above configuration screen:
Name: Name of this instance group.
Pod Spec Override: Need to provide the override
Ansible AWX - Update Policy Instance Minimum of Instance Group
This stage to update policy instance minimum of an instance group in Ansible AWX by providing the details with detailed information in the summary field.
To add “Ansible AWX - Update Policy Instance Minimum of Instance” stage to your pipeline follow the steps below:
Select your application and click “Pipeline builder” and click “Add Stage” and then select “Ansible AWX - Update Policy Instance Minimum of Instance” stage from the drop-down menu as shown below.
Now the configuration screen appears to provide the required parameters.
Provide the following parameters on the above configuration screen:
Name : Name of this instance group.
Policy Instance Minimum : Static minimum number of Instances that will be automatically assigned to this group when new instances come online
Ansible AWX - Update Policy Instance Percentage of Instance Group
This stage to update the policy instance percentage of an instance group in Ansible AWX by providing the details with detailed information in the summary field.
To add “Ansible AWX - Update Policy Instance Percentage of Instance Group” stage to your pipeline follow the steps below:
Select your application and click “Pipeline builder” and click “Add Stage” and then select “Ansible AWX - Update Policy Instance Percentage of Instance Group” stage from the drop-down menu as shown below.
Now the configuration screen appears to provide the required parameters.
Provide the following parameters on the above configuration screen:
Name : Name of this instance group.
Policy Instance Percentage: Minimum percentage of all instances that will be automatically assigned to this group when new instances come online
Last updated