Puppet Class: etcd::client::globalconfig

Defined in:
modules/etcd/manifests/client/globalconfig.pp

Overview

class etcd::client::globalconfig Simple class that installs a world-readable basic config for etcd in yaml format. All our software that interacts with etcd can understand the configuration from this file.

Parameters:

  • srv_domain (Stdlib::Host) (defaults to: "${::site}.wmnet")
  • host (Optional[Stdlib::Host]) (defaults to: undef)
  • port (Optional[Stdlib::Port]) (defaults to: undef)


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
# File 'modules/etcd/manifests/client/globalconfig.pp', line 5

class etcd::client::globalconfig(
    Stdlib::Host           $srv_domain = "${::site}.wmnet",
    Optional[Stdlib::Host] $host = undef,
    Optional[Stdlib::Port] $port = undef,
    ) {


    require_package('python-etcd')

    file { '/etc/etcd':
        ensure => directory,
        owner  => 'root',
        group  => 'root',
        mode   => '0755',
    }

    etcd::client::config { '/etc/etcd/etcdrc':
        world_readable => true,
        settings       => {
            host            => $host,
            port            => $port,
            srv_domain      => $srv_domain,
            ca_cert         => $facts['puppet_config']['localcacert'],
            protocol        => 'https',
            allow_reconnect => true,
        },
    }
}