Webhook Between Ansible Controller & GitLab

In this article, we learn how to create a webhook in GitLab Repo to integrate it with Ansible Automation Platform. Below are the steps involved

 
Create Gitlab Access Token:

You have to go to your GitLab project. You need to go to Settings → Access Token. Based on your requirement you need to select options and create an access token. once created you will see a token display on the GitLab page. Please save the token because you cannot edit the token. You can only delete tokens.


Create a new credential in AAP:

Next, we will use this token to create a new credential in Ansible Tower of type “GitLab Personal Access Token”. Please paste the saved token in the token field.

Upon saving, the Ansible controller now has API access to my GitLab account. 

JobTemplate:

When you are running a job template you need to check the webhook check in the job



Try Push coding using git push and Now you will see an ansible automation controller running the job.

Meena Kande

As a skilled System Administrator, I'm passionate about sharing my knowledge and keeping up with the latest tech trends. I have expertise in managing various server platforms, storage solutions, backup systems, and virtualization technologies. I excel at designing and implementing efficient IT infrastructures.

Post a Comment

Previous Post Next Post