This role can be used to install gitlab-ci-multi-runner and manage runners (register and unregister them as requested).
- runners' configuration cannot be changed after registration
- every runner should have a unique name even tough
gitlab-ci-multi-runner
allows to create multiple runners with the same name
---
- hosts:
- testhost
become: yes
vars:
# concurent = 4
gitlab_multirunner:
runners:
- name: runner21
state: present
ci_server: https://gitlab.example/ci
token: uJLVTcWMrsuYzhBn9Y1N
executor: shell
env:
- "VAR1=value"
- "VAR2=value"
tags:
- my1
- my2
- name: old-runner1
state: absent
- name: old-runner2
state: absent
- name: docker-runner1
state: present
ci_server: https://gitlab.example/ci
token: uJLVTcWMrsuYzhBn9Y1N
executor: docker
docker_image: ubuntu:14.04
roles:
- viasite-ansible.gitlab-ci-multi-runner
The playbook was tested on following platforms:
- Debian 7
- Debian 8
- Ubuntu 12.04
- Ubuntu 14.04
- Ubuntu 16.04
gitlab-ci-multi-runner
supports multiple executors, but these role supports only limited subset.
At the moment it is only:
- shell
- docker
- add support for CentOS
- add integration tests
- support more executors
- make it possible to unregister existing runners
Configuration options may change in the future releases in backward incompatible way.
MIT