robertdebock.gitlab_runner

Ansible Role GitLab Runner

This guide shows you how to install and set up GitLab Runner on your system.

GitHub GitLab Downloads Version
github gitlab downloads Version

Example Playbook

Here is a simple playbook example taken from molecule/default/converge.yml. It has been tested regularly.

---
- name: Setup
  hosts: all
  become: true
  gather_facts: true

  roles:
    - role: robertdebock.gitlab_runner
      gitlab_runner_tags:
        - docker
        - my_runner

Make sure your machine is ready. In Continuous Integration (CI), this is done using molecule/default/prepare.yml:

---
- name: Prepare
  hosts: all
  become: true
  gather_facts: false

  roles:
    - role: robertdebock.bootstrap

You can check a detailed explanation and example for using these roles.

Role Variables

Default values for the variables are in defaults/main.yml:

---
# Default settings for GitLab Runner

# Token to register a runner.
# gitlab_runner_registration_token: "123ABC"

# The name shown in the GitLab web interface.
gitlab_runner_name: "{{ ansible_fqdn }}"

# URL to register the runner.
gitlab_runner_url: "https://gitlab.com/"

# Executor type. Options: "ssh", "shell", "parallels", "virtualbox",
# "docker", "docker_machine", "kubernetes", or "custom"
gitlab_runner_executor: docker

# Docker image to use.
gitlab_runner_docker_image: "alpine:latest"

# GitLab runner version to install.
gitlab_runner_version: "16.3.1"

# Number of concurrent jobs allowed.
gitlab_runner_concurrency: "{{ ansible_processor_vcpus }}"

# Enable or disable privileged runner.
gitlab_runner_privileged: true

Requirements

State of Used Roles

The following roles help set up the system. You can prepare your system differently if you wish.

Requirement GitHub GitLab
robertdebock.bootstrap Build Status GitHub Build Status GitLab

Context

This role works with many other roles. For more information, check the documentation of these roles.

dependencies

Compatibility

This role has been tested on these container images:

Container Tags
EL 9
Ubuntu focal

Ansible version 2.12 or higher is required, and tests have been performed on:

  • The previous version.
  • The current version.
  • The development version.

Report any issues on GitHub.

License

Apache-2.0.

Author Information

Created by robertdebock.

Consider sponsoring me.

Informazioni sul progetto

Install and configure gitlab-runner on your system.

Installa
ansible-galaxy install robertdebock.gitlab_runner
Licenza
apache-2.0
Download
113.6k
Proprietario
I know my way around (Linux) infrastructure, have a passion for automation, Docker, Ansible, Molecule and ci/cd.