Puppet Class: sysfs

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

Overview

SPDX-License-Identifier: Apache-2.0

Class: sysfs

This Puppet module provides 'sysfs::conffile' and 'sysfs::parameters' resources which manages kernel parameters using /etc/sysfs.d files and the sysfsutils service.



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

class sysfs {
    package { 'sysfsutils':
        ensure => present,
    }

    file { '/etc/sysfs.d':
        ensure  => directory,
        owner   => 'root',
        group   => 'root',
        mode    => '0644',
        recurse => true,
        purge   => true,
        force   => true,
    }

    service { 'sysfsutils':
        ensure     => running,
        # Does not have any permanent process, so prevent puppet from
        # attempting to restart a service which is not meant to be running.
        # sysfs::conffile() notify the service to trigger the restart whenever
        # configuration files change.
        hasstatus  => false,
        status     => '/bin/true',
        # Have it running on boot
        enable     => true,
        # Quicker restart
        hasrestart => true,
    }
}