gitlab-runner role
Summary
This Ansible role has the following features:
- Install gitlab-runner
Requirements
- Version of the ansible for installation: 2.5
- Supported OS:
- EL
- 7
- Ubuntu
- 18.04
- EL
Role Variables
-
required
gitlab_version
Specific version of Gitlab-Runner. Default value is10.5
.gitlab_ci_token
A Token you obtained to register the Runner. Default value is ``.
-
defaults
gitlab_runner_skip_registration
Skip gitlab-runner registration after installation. Default value isfalse
gitlab_host
Docker gitlab server. Default value isgit.epam.com
gitlab_runner_tags
The tags associated with the Runner. Should be comma delimited. Default value isdelegated
gitlab_runner_untagged_builds_run
Config that prevents it from picking untagged jobs. Default value isfalse
gitlab_runner_lock_to_project
Config that lock the Runner to current project. Default value isfalse
gitlab_runner_executor
Runner executor. Default value isshell
gitlab_runner_extra_options
Extra option for runner registration process. Default value isundefined
gitlab_runner_limit
Config that Limit how many jobs can be handled concurrently by this token.0
simply means don't limit. Default value is1
gitlab_runner_concurrent
Limits how many jobs globally can be run concurrently. The most upper limit of jobs using all defined runners. 0 does not mean unlimited. Default value isansible_processor_vcpus
gitlab_runner_request_concurrency
Limit number of concurrent requests for new jobs from GitLab. Default value is1
gitlab_runner_env_vars
Append or overwrite environment variables. Default value is["ENV=value", "LC_ALL=en_US.UTF-8"]
packages_additional
Install additional packages for all installs. Default value is[]
gitlab_runner_gpg
GPG key for Debian. Default value ishttps://packages.gitlab.com/gpg.key
Some examples of the installing current role
With playlabs you can install this role with just one command, ie:
playlabs install lean_delivery.gitlab_runner @localhost gitlab_ci_token=yourcommand gitlab_host=yourlabs.io gitlab_runner_limit=4 gitlab_version=11.6
Or, without playlabs, install with galaxy so that you can use with your playbook:
ansible-galaxy install lean_delivery.gitlab-runner
Example Playbook
Installing gitlab-runner to centos 7:
- name: Converge
hosts: rhel_family
roles:
- role: ansible-role-gitlab-runner
vars:
gitlab_runner_concurrent: 1
gitlab_runner_skip_registration: true
Installing gitlab-runner to ubuntu 18.04:
- name: Converge
hosts: debian_family
roles:
- role: ansible-role-gitlab-runner
vars:
gitlab_runner_concurrent: 1
gitlab_version: "10.5"
gitlab_runner_skip_registration: true
License
Apache
Author Information
authors:
- Lean Delivery Team team@lean-delivery.com