Puppet Class: psick::gitlab::proxy

Defined in:
manifests/gitlab/proxy.pp

Overview

This class manages the installation and initialisation of a GitLab proxy.

Parameters:

  • ensure (String) (defaults to: 'present')

    If to install or remove the GitLab CI runner

  • auto_prereq (Boolean) (defaults to: false)

    If to automatically install all the prerequisites resources needed to install the runner

  • template (Optional[String]) (defaults to: 'psick/gitlab/proxy/nginx_gitlab_proxy.conf.erb')

    The path to the erb template (as used in template()) to use to populate the Runner configuration file. Note that if you use the runners parameter this file is automatically generated during runners registration

  • options (Hash) (defaults to: { })

    An open hash of options you may use in your template

  • server_name (String) (defaults to: $::fqdn)
  • proxy_pass (String) (defaults to: "https://gitlab.${::domain}:443")


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
39
40
41
# File 'manifests/gitlab/proxy.pp', line 12

class psick::gitlab::proxy (
  String                $ensure      = 'present',
  Boolean               $auto_prereq = false,
  Optional[String]      $template    = 'psick/gitlab/proxy/nginx_gitlab_proxy.conf.erb',
  Hash                  $options     = { },
  String                $server_name = $::fqdn,
  String                $proxy_pass  = "https://gitlab.${::domain}:443",
) {

  $options_default = {
    server_name => $server_name,
    proxy_pass  => $proxy_pass,
  }
  $proxy_options = $options_default + $options
  if $auto_prereq {
    ::tp::install { 'nginx' :
      ensure             => $ensure,
    }
  }

  if $template {
    ::tp::conf { 'nginx::gitlab-proxy.conf':
      ensure       => $ensure,
      template     => $template,
      base_dir     => 'conf',
      options_hash => $proxy_options,
    }
  }

}