Puppet Class: systemd::udevd

Defined in:
manifests/udevd.pp

Summary

This class manages systemd's udev config

Overview



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
# File 'manifests/udevd.pp', line 4

class systemd::udevd {
  assert_private()

  service { 'systemd-udevd':
    ensure => running,
    enable => true,
  }

  file { '/etc/udev/rules.d':
    ensure  => directory,
    purge   => $systemd::udev_purge_rules,
    recurse => true,
  }

  file { '/etc/udev/udev.conf':
    ensure  => 'file',
    owner   => 'root',
    group   => 'root',
    mode    => '0444',
    content => epp("${module_name}/udev_conf.epp", {
        'udev_log'            => $systemd::udev_log,
        'udev_children_max'   => $systemd::udev_children_max,
        'udev_exec_delay'     => $systemd::udev_exec_delay,
        'udev_event_timeout'  => $systemd::udev_event_timeout,
        'udev_resolve_names'  => $systemd::udev_resolve_names,
        'udev_timeout_signal' => $systemd::udev_timeout_signal,
    }),
    notify  => Service['systemd-udevd'],
  }

  $systemd::udev_rules.each |$udev_rule_name, $udev_rule| {
    systemd::udev::rule { $udev_rule_name:
      * => $udev_rule,
    }
  }

  exec { 'systemd-udev_reload':
    command     => 'udevadm control --reload-rules && udevadm trigger',
    refreshonly => true,
    path        => $facts['path'],
  }
}