Puppet Class: systemd

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

Overview

Class systemd ==

This class defines a guard against running on non-systemd systems, a few constants, and the check_journal_pattern nrpe plugin. It also defines an exec shared across all instantations of systemd::sysuser.



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

class systemd {
    if $::initsystem != 'systemd' {
        fail(
            "You can only use systemd resources on systems with systemd, got ${::initsystem}"
        )
    }

    # Directories for base units and overrides
    $base_dir = '/lib/systemd/system'
    $override_dir = '/etc/systemd/system'

    file { '/etc/sysusers.d':
        ensure  => directory,
        purge   => true,
        recurse => true,
    }

    exec { 'Refresh sysusers':
        command     => '/bin/systemd-sysusers',
        user        => 'root',
        refreshonly => true,
    }

    file { '/usr/local/lib/nagios/plugins/check_journal_pattern':
        ensure => present,
        source => 'puppet:///modules/systemd/check_journal_pattern',
        mode   => '0555',
        owner  => 'root',
        group  => 'root',
    }
}