No description
Find a file
2022-01-21 15:47:22 +01:00
.github Regenerate CI and docs. 2021-10-13 11:42:00 +02:00
defaults Add support for untagged builds 2021-12-06 12:49:50 +01:00
handlers Moving to collections instead of modules shipped with Ansible. 2021-02-19 14:08:35 +01:00
meta Let go of Debian. 2021-09-22 15:28:36 +02:00
molecule/default Add ansible-later and implement advices. 2021-10-11 17:08:43 +02:00
tasks Add support for vaulted tokens 2022-01-21 15:33:22 +01:00
vars Unique YAML anchors. 2021-07-05 16:35:45 +02:00
.ansible-lint Start yaml with three dashes. 2021-03-28 12:44:41 +02:00
.gitignore Make unused variable finding work on Mac OS X 2021-03-25 15:28:23 +01:00
.gitlab-ci.yml Regenerate CI and docs. 2021-10-13 11:42:00 +02:00
.later.yml Add ansible-later and implement advices. 2021-10-11 17:08:43 +02:00
.pre-commit-config.yaml Regenerate CI and docs. 2021-10-07 22:38:02 +02:00
.travis.yml Regenerate CI and docs. 2021-06-10 09:51:06 +02:00
.yamllint No rawhide, package GPG issue. 2021-02-15 15:14:35 +01:00
CODE_OF_CONDUCT.md Initial commit 2019-05-21 22:02:57 +02:00
CONTRIBUTING.md Regenerate docs and ci. 2020-08-08 17:11:11 +02:00
LICENSE Remove unused variable. 2021-01-04 13:11:36 +01:00
README.md Let go of Debian. 2021-09-22 15:28:36 +02:00
requirements.txt Ansible 2.10 and up are tested 2021-01-18 09:50:31 +01:00
requirements.yml The collection community.general is required because apk and zypper. 2021-09-20 09:46:47 +02:00
SECURITY.md Add MarkDown anchors. 2020-06-04 21:09:38 +02:00
tox.ini Regernerate CI, fix molecule and tox. 2021-05-11 13:18:34 +02:00

gitlab_runner

Install and configure gitlab-runner on your system.

GitHub GitLab Quality Downloads Version
github gitlab quality downloads Version

Example Playbook

This example is taken from molecule/default/converge.yml and is tested on each push, pull request and release.

---
- name: converge
  hosts: all
  become: yes
  gather_facts: yes

  roles:
    - role: robertdebock.gitlab_runner
      gitlab_runner_token: fake-token
      gitlab_runner_register_runner: no

The machine needs to be prepared. In CI this is done using molecule/default/prepare.yml:

---
- name: prepare
  hosts: all
  become: yes
  gather_facts: no

  roles:
    - role: robertdebock.bootstrap

Also see a full explanation and example on how to use these roles.

Role Variables

The default values for the variables are set in defaults/main.yml:

---
# defaults file for gitlab_runner

# These are the setting you need to register a runner.
# gitlab_runner_token: 123ABC

# Should this role register the gitlab runner?
gitlab_runner_register_runner: yes

# The name as shown in the GitLab webinterface.
gitlab_runner_name: "{{ ansible_fqdn }}"

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

# The tags, comma separated.
gitlab_runner_tags: "docker,my_runner"

# The type of executor. Choose from: "ssh", "shell", "parallels", "virtualbox",
# "docker", "docker_machine", "kubernetes" or "custom"
gitlab_runner_executor: docker

# The docker image to run.
gitlab_runner_docker_image: "alpine:latest"

Requirements

Status of used roles

The following roles are used to prepare a system. You can prepare your system in another way.

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

Context

This role is a part of many compatible roles. Have a look at the documentation of these roles for further information.

Here is an overview of related roles: dependencies

Compatibility

This role has been tested on these container images:

container tags
el all
ubuntu all

The minimum version of Ansible required is 2.10, tests have been done to:

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

Exceptions

Some roles can't run on a specific distribution or version. Here are some exceptions.

variation reason
Alpine Not supported, see https://docs.gitlab.com/ee/install/requirements.html
Archlinux Not supported, see https://docs.gitlab.com/ee/install/requirements.html
EL 8 Not supported, see https://docs.gitlab.com/ee/install/requirements.html
Fedora Not supported, see https://docs.gitlab.com/ee/install/requirements.html
Ubuntu rolling Not supported, see https://docs.gitlab.com/ee/install/requirements.html
debian:buster Not supported, see https://docs.gitlab.com/runner/install/linux-repository.html

If you find issues, please register them in GitHub

License

Apache-2.0

Author Information

Robert de Bock

Please consider sponsoring me.