summaryrefslogtreecommitdiff
path: root/manifests/params.pp
blob: 2525183caf7fd7b8ba7316fc44597eb1f30d9273 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# == Class gitlab_ci_multi_runner::params
#
# This class is meant to be called from gitlab_ci_multi_runner
# It sets variables according to platform
#
class gitlab_ci_multi_runner::params {

  $config_file         = '/etc/gitlab-runner/config.toml'
  $user                = 'gitlab-runner'
  $group               = 'gitlab-runner'

  $concurrent          = 1
  $runners             = {}

  $service_ensure      = true
  $service_start       = '/usr/bin/gitlab-runner start'
  $service_stop        = '/usr/bin/gitlab-runner stop'
  $service_status      = '/usr/bin/gitlab-runner status'
  $service_restart     = '/usr/bin/gitlab-runner restart'

  case $::osfamily {
    'Debian': {
      $package_name        = 'gitlab-runner'
      $service_name        = 'gitlab-runner'
      $manage_package_repo = true
      $service_enable      = false
    }
    'RedHat': {
      $package_name        = 'gitlab_ci_multi_runner'
      $service_name        = 'gitlab_ci_multi_runner'
      $manage_package_repo = false
      $service_enable      = true
    }
    default: {
      fail("${::operatingsystem} not supported")
    }
  }
}