Defined Type: etcd::client::config

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

Overview

define etcd::client::config

Allows to create an etcd config file that can be read by our own clients

This file is by default owned by root and will not be world-readable

Parameters:

  • ensure (Wmflib::Ensure) (defaults to: present)
  • owner (String[1]) (defaults to: 'root')
  • group (String[1]) (defaults to: 'root')
  • world_readable (Boolean) (defaults to: false)
  • settings (Etcd::Client::Settings) (defaults to: {})


5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'modules/etcd/manifests/client/config.pp', line 5

define etcd::client::config(
    Wmflib::Ensure         $ensure         = present,
    String[1]              $owner          = 'root',
    String[1]              $group          = 'root',
    Boolean                $world_readable = false,
    Etcd::Client::Settings $settings       = {},
    ) {

    $file_perms = $world_readable ? {
        true    => '0444',
        default => '0440',
    }

    file { $title:
        ensure  => $ensure,
        owner   => $owner,
        group   => $group,
        mode    => $file_perms,
        content => template('etcd/client_config.erb'),
    }
}