GitLab Runner
This role installs the gitlab-runner
agent and registers runners.
Requirements
This role required Ansible 2.0 or higher.
Role Variables
Variable | Default | Purpose |
---|---|---|
gitlab_runner_package |
gitlab-runner |
As of GitLab 9.0, the GitLab Runner package has started using version 4 of the GitLab API and has been renamed to gitlab-runner . If you need to support GitLab versions prior to v9.0 then you need to use the older GitLab Runner package by setting this variable to gitlab-ci-multi-runner . |
gitlab_runner_install |
true |
Asserts whether to install the GitLab Runner agent. |
gitlab_runner_register |
true |
Asserts whether to register a runner. |
gitlab_runner_user |
gitlab-runner |
The username of the user that will be created to run the runner agent. |
gitlab_runner_groups |
[] |
Additional groups that the gitlab_runner_user should belong to. |
gitlab_runner_shell |
/bin/bash |
The shell that the gitlab_runner_user should use. |
gitlab_runner_sudo_cmds |
[] |
Specific shelll commands that the gitlab_runner_user can run as sudo , without a password. |
gitlab_runner_concurrent_jobs |
2 | The number of concurrent jobs that can be executed by this runner |
gitlab_runner_check_interval |
5 | How often the agent should check for new pending jobs. Value is in seconds. |
gitlab_runner_privkey |
'' | Private SSH key which is added to the gitlab_runner_user for use as a deploy key. |
gitlab_runner_pubkey |
'' | The public SSH key that matches the gitlab_runner_privkey . This is set up as a global deploy key in GitLab so all you have to do it enable that deploy key on your project. |
Per-Runner Variables
Variable | Default | Purpose |
---|---|---|
gitlab_runner_url |
'' | REQUIRED The GitLab CI coordinator URL. |
gitlab_runner_token |
'' | REQUIRED A runner registration token for a project. These are unique per GitLab project. |
gitlab_runner_description |
{{ ansible_hostname }} |
The name/description of the runner. |
gitlab_runner_executor |
shell |
The executor for this runner. Currently only supports shell .
|
gitlab_runner_tags |
[] | List of tags for which the runner should accept jobs. If not empty, then the runner will only run tagged jobs. |
gitlab_runner_locked |
true | Asserts whether the runner should be locked to the project. |