Puppet Class: standard

Defined in:
modules/standard/manifests/init.pp

Overview

Parameters:

  • has_default_mail_relay (Any) (defaults to: true)
  • has_admin (Any) (defaults to: true)
  • monitoring_hosts (Array[String]) (defaults to: [])


4
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# File 'modules/standard/manifests/init.pp', line 4

class standard(
    $has_default_mail_relay = true,
    $has_admin = true,
    Array[String] $monitoring_hosts = [],
    ) {
    include ::profile::base
    include ::standard::ntp

    if $::realm == 'production' {
        include ::profile::cumin::target
        include ::profile::debmonitor::client  # lint:ignore:wmf_styleguide
    }

    unless $::fqdn in $::ntp_peers[$::site] {
        if (os_version('debian >= jessie')) {
            include ::standard::ntp::timesyncd
        } else {
            class { '::standard::ntp::client':
                monitoring_hosts => $monitoring_hosts,
            }
        }
    }

    include ::standard::diamond
    include ::standard::prometheus

    # Some instances have their own exim definition that
    # will conflict with this
    if $has_default_mail_relay {
        include ::standard::mail::sender
    }

    # Some instances in production (ideally none) and labs do not use
    # the admin class
    if $has_admin {
        include ::admin
    }

    # For historical reasons, users in modules/admin/data/data.yaml
    # (for production) and in LDAP (for Labs) start at uid/gid 500, so
    # we need to guard against system users being created in that
    # range.
    file_line { 'login.defs-SYS_UID_MAX':
        path  => '/etc/login.defs',
        match => '#?SYS_UID_MAX\b',
        line  => 'SYS_UID_MAX               499',
    }
    file_line { 'login.defs-SYS_GID_MAX':
        path  => '/etc/login.defs',
        match => '#?SYS_GID_MAX\b',
        line  => 'SYS_GID_MAX               499',
    }
}