Integrate GIT with AWX
In this How To we will go over how to use a SCM (source control manager) as the source project in your AWX. AWX is front-end web based GUI to administer your playbooks and to create workflow’s in your enterprise. AWX is easy to use and easy to setup, however it needs a source project before it can start doing any automation. On this site we have been using Ansible to automate network devices. We will use AWX for the same purpose. In all my at home labs i use GITLAB as my git source control manager, and this how to will be no different. First we will need to create a credential on GITLAB for AWX to authenticate too. Then we will create a project and use my GITLAB repository as the source control for the AWX project.
Instructions
Follow these steps to integrate GIT into AWX
Next display the public key of the key you just created. ***NOTE*** the name of this does not have to have awx in the title, it can be anything you want.
Now copy the entire public key and head over to your GITLAB account. Go to User > Settings > SSH Keys.
At the SSH Keys tab input the information in the picture above. Once you have done that click the “add key” button.
Now let’s head over to our AWX web GUI.
In the AWX GUI click on Credentials > Create Credentials. Now fill out the following information.
In this step you are creating a credential to login and access your Git repository. Take note of all the other credential types for projects in the future.
Now let’s create a project using the master branch of our Git repository. Click on Projects > Create Project. Input the following information.
The important part here is making sure that your SCM URL is the correct HTTPs link to GITLAB repository we want to use. Also make sure to check the “UPDATE REVISION ON LAUNCH” check box. This ensures that your project will always stay up to date with your repository. Now click save.
This ends the Integrate GIT with AWX How to. Click on the links below for more or better information.
Related articles
Related Links | |
The guide I followed to setup my AWX. | |
Free GIT training. | |
The Ansible Project’s official tower guide. | |
The AWX GIT repository. |
Last updated