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
|
# File 'manifests/networkd.pp', line 8
class systemd::networkd (
Enum['stopped','running'] $ensure = $systemd::networkd_ensure,
Stdlib::Absolutepath $path = $systemd::network_path,
Boolean $manage_all_network_files = $systemd::manage_all_network_files,
) {
assert_private()
$_enable_networkd = $ensure ? {
'stopped' => false,
'running' => true,
default => $ensure,
}
service { 'systemd-networkd':
ensure => $ensure,
enable => $_enable_networkd,
}
# this directory is created by systemd
# we define it here to purge non-managed files
if $manage_all_network_files {
file { $path:
ensure => 'directory',
recurse => true,
purge => true,
notify => Service['systemd-networkd'],
}
}
}
|