README.md 1.15 KB
Newer Older
Harold Barker's avatar
Harold Barker committed
1 2 3
GitLab Runner
=============

Harold Barker's avatar
Harold Barker committed
4
This role will install the [official GitLab Runner](https://gitlab.com/gitlab-org/gitlab-ci-multi-runner)
Harold Barker's avatar
Harold Barker committed
5 6 7 8 9 10 11 12 13 14

Requirements
------------

This role requires Ansible 2.0 or higher.


Role Variables
--------------

Harold Barker's avatar
Harold Barker committed
15
`gitlab_runner_concurrent`
Harold Barker's avatar
Harold Barker committed
16 17 18
The maximum number of jobs to run concurrently.
Defaults to the number of processor cores.

Harold Barker's avatar
Harold Barker committed
19
`gitlab_runner_coordinator_url`
Harold Barker's avatar
Harold Barker committed
20
The GitLab coordinator URL.
Harold Barker's avatar
Harold Barker committed
21
Defaults to `https://gitlab.com/ci`.
Harold Barker's avatar
Harold Barker committed
22

Harold Barker's avatar
Harold Barker committed
23
`gitlab_runner_registration_token`
Harold Barker's avatar
Harold Barker committed
24 25
The GitLab registration token.

Harold Barker's avatar
Harold Barker committed
26
`gitlab_runner_description`
Harold Barker's avatar
Harold Barker committed
27 28 29
The description of the runner.
Defaults to the hostname.

Harold Barker's avatar
Harold Barker committed
30
`gitlab_runner_executor`
Harold Barker's avatar
Harold Barker committed
31
The executor used by the runner.
Harold Barker's avatar
Harold Barker committed
32
Defaults to `shell`.
Harold Barker's avatar
Harold Barker committed
33

Harold Barker's avatar
Harold Barker committed
34
`gitlab_runner_tags`
Harold Barker's avatar
Harold Barker committed
35 36
The tags assigned to the runner,
Defaults to an empty list.
Harold Barker's avatar
Harold Barker committed
37 38 39 40 41 42 43 44

Dependencies
------------

None

Example Playbook
----------------
Harold Barker's avatar
Harold Barker committed
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
```yaml
- hosts: all
  remote_user: root
  vars_files:
    - vars/main.yml
  roles:
    - { role: haroldb.gitlab-runner }
```

Inside `vars/main.yml`
```yaml
gitlab_runner_registration_token: 'HUzTMgnxk17YV8Rj8ucQ'
gitlab_runner_description: 'Example GitLab Runner'
gitlab_runner_tags:
  - node
  - ruby
  - mysql
```
Harold Barker's avatar
Harold Barker committed
63 64 65 66 67

License
-------

MIT