Puppet Class: profile::systemd::timesyncd

Defined in:
modules/profile/manifests/systemd/timesyncd.pp

Summary

profile to configure systemd timesyncd

Overview

Parameters:

  • ensure (Wmflib::Ensure) (defaults to: lookup('profile::systemd::timesyncd::ensure'))

    wether to ensure the profile

  • ntp_servers (Array[Stdlib::Host]) (defaults to: lookup('profile::systemd::timesyncd::ntp_servers'))

    list of ntp servers



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
# File 'modules/profile/manifests/systemd/timesyncd.pp', line 4

class profile::systemd::timesyncd (
    Wmflib::Ensure      $ensure      = lookup('profile::systemd::timesyncd::ensure'),
    Array[Stdlib::Host] $ntp_servers = lookup('profile::systemd::timesyncd::ntp_servers'),
) {

    class {'systemd::timesyncd':
        ensure      => $ensure,
        ntp_servers => $ntp_servers,
    }
    # HDFS/fuse is known to cause issues with timesync and ProtectSystem= strict
    # As such remove this from the list of accessible paths (T310643)
    systemd::unit { 'systemd-timesyncd.service':
        ensure   => $ensure,
        content  => "[Service]\nInaccessiblePaths=-/mnt\n",
        restart  => true,
        override => true,
    }
    systemd::unit { 'systemd-timedated.service':
        ensure   => $ensure,
        content  => "[Service]\nInaccessiblePaths=-/mnt\n",
        restart  => true,
        override => true,
    }
    profile::auto_restarts::service { 'systemd-timesyncd':
        ensure => $ensure,
    }

    file { '/usr/lib/nagios/plugins/check_timedatectl':
        ensure => 'absent',
    }
    # /usr/local/lib/nagios/plugins is managed by the nrpe module
    # and dependencies will be handled via auto requires
    nrpe::plugin { 'check_timedatectl':
        ensure => $ensure,
        source => 'puppet:///modules/profile/systemd/check_timedatectl',
    }

    nrpe::monitor_service { 'timesynd_ntp_status':
        ensure         => $ensure,
        description    => 'Check the NTP synchronisation status of timesyncd',
        nrpe_command   => '/usr/local/lib/nagios/plugins/check_timedatectl',
        contact_group  => 'admins',
        check_interval => 30,
        notes_url      => 'https://wikitech.wikimedia.org/wiki/NTP',
    }
}