Server Management

Create Credentials for GitLab to use in the Ansible Automation Platform

Last modified 3/3/2023

To run Ansible playbooks in the Ansible Automation Platform (AAP), you must first create a Project in AAP, however to create a project, you must import a git repository. This guide will detail how to setup GitLab with AAP.

Before you Begin

Ansible playbooks that you want to use and import should be in git repositories. If you are currently not using Illinois State's GitLab, your team can be onboarded by submitting a ticket to Technology Solutions Application Administration team.

Create GitLab Access Token

In order to allow Ansible Automation Platform (AAP) to read your git repositories, you must setup an Access Token in GitLab for your group.

  1. Login to GitLab and browse to your group.
  2. Select Settings in the left pane.
  3. Then select Access Tokens in the left pane.
  4. On the Group Access Tokens screen,
    1. Give the token a friendly name like - AAP Read Token
    2. Select the Read scopes - read_api, read_repository, red_registry
  5. Once finished select the Create group access token button.
  6. Use the view/copy buttons on the right side to view the token. Be sure to save it in a password manager because if you lose the password you will have to recreate a new token.

Create Source Control Credential in AAP

In order to import from GitLab into the Ansible Automation Platform (AAP), you must setup a Source Control credential to allow for AAP to read your git repositories.

  1. Login into the Ansible Automation Platform and browse to the Credentials section in the left pane.
  2. On the Credentials page, select Add.
  3. On the Create New Credential Screen,
    1. Give the Credential a name (example: TS GitLab Read Token)
    2. Give it a optional description
    3. Select your Organization (there should only be a single option)
    4. Select Source Control for the Credential Type
  4. Upon selecting the Credential Type additional options will appear,
    1. For Username, enter anything (it has to be a non-null value and is unused)
    2. For Password, enter your GitLab Access Token from eariler.
  5. Then select Save.

Still Need Assistance?

If you need assistance with accessing and using GitLab, please reach out to the Tech Solutions Application Administration team.

If you need help with the Ansible Automation Platform, please reach out to the Tech Solutions Cloud Compute & Authentication team.

See Also: