Installs gitlab-runner as docker container.
- Docker
- Systemd
- Create volume paths for docker container
- Setup systemd unit file
- Register runner to gitlab if specified
- Start/Restart gitlab-runner service
Variable | Type | Mandatory? | Default | Description |
---|---|---|---|---|
image_name | text | no | gitlab/gitlab-runner | Docker image name |
image_version | text | no | alpine-v9.5.0 | Docker image version |
config_volume | text | no | Path to config volume | |
gitlab_uri | url | no | Url to gitlab instance (needed for registration) | |
registration_token | text | no | Registration token (needed for registration, provided by gitlab) | |
force_registration | boolean | no | False | Force registration |
Usage (without parameters):
- hosts: servers
roles:
- { role: install-docker-gitlab }
Usage (with parameters):
- hosts: servers
roles:
- role: install-docker-gitlab
gitlab_uri: 'http://192.168.56.101'
force_registration: False
registration_token: 'XXX'
config_volume: /srv/docker/gitlab-runner