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.
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 33 |
# 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,
) {
# Initially added for etcd-manage, but it's not really clear
# if any roles implicitly depend on it, so keep older distros
if debian::codename::lt('bullseye'){
ensure_packages('python-etcd')
}
file { '/etc/etcd':
ensure => directory,
mode => '0755',
}
etcd::client::config { '/etc/etcd/etcdrc':
world_readable => true,
settings => {
host => $host,
port => $port,
srv_domain => $srv_domain,
ca_cert => '/etc/ssl/certs/wmf-ca-certificates.crt',
protocol => 'https',
allow_reconnect => true,
},
}
}
|