Puppet Class: pybal::configuration

Defined in:
modules/pybal/manifests/configuration.pp

Overview

Class pybal::configuration

Writes the pybal configuration to disk.

Parameters: $services - hash of services that are present on this load-balancer lvs_class_hosts - comes from lvs::configuration. config - wether to fetch the config from etcd or http global_options - pybal global options config_host - the fqdn:port for the host to get config from conftool_prefix - the prefix to use in queries to etcd

Parameters:

  • services (Hash[String, Wmflib::Service])
  • lvs_class_hosts (Hash)
  • site (String)
  • config (Enum['etcd', 'http']) (defaults to: 'http')
  • global_options (Hash) (defaults to: {})
  • config_host (String) (defaults to: "config-master.${site}.wmnet")
  • conftool_prefix (String) (defaults to: '/conftool/v1')


11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'modules/pybal/manifests/configuration.pp', line 11

class pybal::configuration(
    Hash[String, Wmflib::Service] $services,
    Hash $lvs_class_hosts,
    String $site,
    Enum['etcd', 'http'] $config='http',
    Hash $global_options={},
    String $config_host="config-master.${site}.wmnet",
    String $conftool_prefix = '/conftool/v1',
) {

    # Generate PyBal config file
    file { '/etc/pybal/pybal.conf':
        require => Package['pybal'],
        content => template("${module_name}/pybal.conf.erb");
        # do not notify => Service['pybal'] on purpose
    }

}