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

Parameters:

  • namespace (Any)
  • tcpircbot_host (Any)
  • tcpircbot_port (Any)
  • hosts (Any) (defaults to: [])


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 'modules/conftool/manifests/config.pp', line 15

class conftool::config ($namespace, $tcpircbot_host, $tcpircbot_port, $hosts = []) {
    file { '/etc/conftool':
        ensure => directory,
        owner  => 'root',
        group  => 'root',
        mode   => '0755',
    }

    file { '/etc/conftool/config.yaml':
        ensure  => present,
        owner   => 'root',
        group   => 'root',
        mode    => '0444',
        content => to_yaml({
            hosts          => $hosts,
            tcpircbot_host => $tcpircbot_host,
            tcpircbot_port => $tcpircbot_port,
            driver_options => {
                allow_reconnect       => true,
                # requires update to python-etcd
                suppress_san_warnings => false
            },
            namespace      => $namespace,
        }),
    }

}