Skip to content

mprenditore/ansible-role-gitlab-runner

 
 

Repository files navigation

gitlab-runner role

License Build Status Build Status Galaxy Ansible Ansible

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

Role Variables

  • required

    • gitlab_version
      Specific version of Gitlab-Runner. Default value is 10.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 is false
    • gitlab_host
      Docker gitlab server. Default value is git.epam.com
    • gitlab_runner_tags
      The tags associated with the Runner. Should be comma delimited. Default value is delegated
    • gitlab_runner_untagged_builds_run
      Config that prevents it from picking untagged jobs. Default value is false
    • gitlab_runner_lock_to_project
      Config that lock the Runner to current project. Default value is false
    • gitlab_runner_executor
      Runner executor. Default value is shell
    • gitlab_runner_extra_options
      Extra option for runner registration process. Default value is undefined
    • gitlab_runner_limit
      Config that Limit how many jobs can be handled concurrently by this token. 0 simply means don't limit. Default value is 1
    • 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 is ansible_processor_vcpus
    • gitlab_runner_request_concurrency
      Limit number of concurrent requests for new jobs from GitLab. Default value is 1
    • 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 is https://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:

Packages

No packages published

Languages

  • Python 100.0%