Defined Type: diamond::collector::extendedexim

Defined in:
modules/diamond/manifests/collector/extendedexim.pp

Overview

Parameters:

  • settings (Any) (defaults to: {})
  • ensure (Any) (defaults to: present)


15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'modules/diamond/manifests/collector/extendedexim.pp', line 15

define diamond::collector::extendedexim(
    $settings = {},
    $ensure   = present,
) {
    # lint:ignore:quoted_booleans
    # This is jammed straight into a config file, needs quoting.
    $default_settings = {'use_sudo' => 'true'}
    # lint:endignore
    $merged_settings = merge($default_settings, $settings)

    diamond::collector { 'ExtendedExim':
        ensure   => $ensure,
        settings => $merged_settings,
        source   => 'puppet:///modules/diamond/collector/extendedexim.py',
    }

    if str2bool($merged_settings[use_sudo]) {
        sudo::user { 'diamond_sudo_for_exim':
            ensure     => $ensure,
            user       => 'diamond',
            privileges => ['ALL=(root) NOPASSWD: /usr/sbin/exim, /bin/cat /var/log/exim4/paniclog'],
        }
    }
}