Puppet Class: conftool::config
- Defined in:
- modules/conftool/manifests/config.pp
Overview
Class conftool::config
Sets up the conftool configuration
Parameters
[namespace] The namespace of the conftool keys.
[tcpircbot_host] The host to connect to for tcpircbot
[tcprircbot_port] The port to connect to for tcpircbot
[hosts] List of etcd hosts (not needed if using srv discovery), empty by default
[conftool2git_address] The address of the conftool2git server, if any
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 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'modules/conftool/manifests/config.pp', line 17
class conftool::config ($namespace, $tcpircbot_host, $tcpircbot_port, $hosts = [], $conftool2git_address = '') {
file { '/etc/conftool':
ensure => directory,
owner => 'root',
group => 'root',
mode => '0755',
}
$config = {
'hosts' => $hosts,
'tcpircbot_host' => $tcpircbot_host,
'tcpircbot_port' => $tcpircbot_port,
'driver_options' => {
'allow_reconnect' => true,
'suppress_san_warnings' => false
},
'namespace' => $namespace,
'extensions_config' => {
'reqconfig' => {
'haproxy_reserved_slots' => [0],
'varnish_acl_ipblocks' => [],
}
}
}
if $conftool2git_address != '' {
$extra_config = {
'conftool2git_address' => $conftool2git_address,
}
} else {
$extra_config = {}
}
file { '/etc/conftool/config.yaml':
ensure => present,
owner => 'root',
group => 'root',
mode => '0444',
content => stdlib::to_yaml($config + $extra_config),
}
}
|