2020-08-10 01:37:13 +02:00
---
2020-09-26 18:12:59 +02:00
# Default variables for the gitlab_runner role
2020-08-10 01:37:13 +02:00
# Infrastructure
# Ansible instructions to deploy the infrastructure
# Copyright (C) 2020 Saibotk
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, version 3 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Install location settings
gitlabrunner_install_location : "/srv/gitlab-runner"
gitlabrunner_config_location : "{{ gitlabrunner_install_location }}/config"
# The runner image & tag/version to be used
2020-08-13 06:17:11 +02:00
gitlabrunner_image : "docker.io/gitlab/gitlab-runner"
2020-09-26 05:45:57 +02:00
gitlabrunner_image_version : "alpine-v13.4.1"
2020-08-13 06:17:11 +02:00
# Extra volumes that should be added to the gitlab runner container.
gitlabrunner_extra_volumes : [ ]
2020-08-10 01:37:13 +02:00
# The URL of the instance that this runner should be associated with
gitlabrunner_gitlab_url : https://gitlab.example.com
# The token that you received when registering the runner (not the register token!!!)
# Register a runner first to obtain a token: https://docs.gitlab.com/runner/register/index.html#docker
2020-08-13 06:17:11 +02:00
# Can be done via the API and the registration token: eg. `curl --request POST "https://gitlab.example.com/api/v4/runners" --form "token=<registration_token>"`
2020-08-10 01:37:13 +02:00
gitlabrunner_gitlab_token :
2020-08-13 06:17:11 +02:00
# The name of the runner
gitlabrunner_name : "docker-runner"
2020-08-10 01:37:13 +02:00
# The maximum overall concurrent running jobs. This is the most upper limit of number of jobs using all defined runners, local and autoscale.
gitlabrunner_concurrent : 1
# The limit of machines created by the runner and with that also the limit of jobs that can be handled concurrently by this specific autoscale runner.
gitlabrunner_limit : 1
2020-08-13 06:17:11 +02:00
# The interval in seconds, to check for available jobs. (0 means default value is used. See https://docs.gitlab.com/runner/configuration/advanced-configuration.html#how-check_interval-works)
gitlabrunner_check_interval : 0
# The executor that is used for this runner.
# Eg. "docker", "shell", "docker+machine"
gitlabrunner_executor : "docker"
# Should the docker runner start containers as privileged? (eg. needed for docker in docker / building with docker etc)
gitlabrunner_docker_privileged : false
# Should the docker socket be mounted into the containers? (SECURITY NOTE: This is critical, as it is effectively the same as root!)
gitlabrunner_docker_mount_socket : false
# The image that should be used for jobs by default
gitlabrunner_docker_image : "docker.io/library/docker:stable"
2020-08-10 01:37:13 +02:00
# The docker-machine driver that should be used (the server provider)
gitlabrunner_machine_driver : "hetzner"
2020-08-13 06:17:11 +02:00
# The template for naming new machines
gitlabrunner_machine_name : "machine-%s-gitlab-runner"
2020-08-10 01:37:13 +02:00
# The maximum amount of builds on a machine (VM) before a new one will be used
gitlabrunner_machine_max_builds : 20
# Time (in seconds) for machine to be in Idle state before it is removed.
gitlabrunner_machine_idle_time : 1800
# Number of machines, that need to be created and are waiting in Idle state.
gitlabrunner_machine_idle_count : 0
2020-08-13 06:17:11 +02:00
# The "MachineOptions" field with parameters that depend on the driver (these usually provide the api token, which machine type is used etc...)
# This for example are parameters for the Hetzner driver (but remember, that this will need the hetzner docker-machine plugin)
gitlabrunner_machine_options :
hetzner-api-token : "TOKENHERE" # The Hetzner specific API token
hetzner-image : "debian-10" # The image that should be used for new machines
hetzner-server-type : "cx11" # The server type (the hardware configuration) to use for a new machine
hetzner-server-location : "fsn1" # The server location to use for a new machine
2020-08-10 01:37:13 +02:00
# S3 Runner cache configuration to improve performance between runs (see https://docs.gitlab.com/runner/configuration/autoscale.html#distributed-runners-caching)
gitlabrunner_cache_s3 :
enabled : false
server : s3.example.com
access_key : ""
secret_key : ""
bucket : "runner"