flandiGT / ansible-gitlab-runner

Ansible role to install gitlab-runner as docker service

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ansible-gitlab-runner

Installs gitlab-runner as docker container.

Requirements

  • Docker
  • Systemd

Tasks

  • Create volume paths for docker container
  • Setup systemd unit file
  • Register runner to gitlab if specified
  • Start/Restart gitlab-runner service

Role parameters

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

Example Playbook

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

About

Ansible role to install gitlab-runner as docker service


Languages

Language:Shell 100.0%