27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
# File 'manifests/map.pp', line 27
define autofs::map (
Enum['present', 'absent'] $ensure = 'present',
Stdlib::Absolutepath $mapfile = $title,
Enum['autofs/auto.map.erb', 'autofs/auto.map.exec.erb'] $template = 'autofs/auto.map.erb',
String $mapmode = '0644',
Boolean $replace = true,
Integer $order = 1,
Variant[Array, String] $mapcontents = [],
) {
include 'autofs'
unless $autofs::package_ensure == 'absent' {
if $autofs::reload_command {
Concat {
before => Service[$autofs::service_name],
notify => Exec['automount-reload'],
}
} else {
Concat {
notify => Service[$autofs::service_name],
}
}
}
ensure_resource(concat, $mapfile, {
ensure => $ensure,
owner => $autofs::map_file_owner,
group => $autofs::map_file_group,
mode => $mapmode,
replace => $replace,
require => Class['autofs::package'],
}
)
unless $ensure == 'absent' {
concat::fragment { "${mapfile}_${name}_entries":
target => $mapfile,
content => template($template),
order => $order,
}
}
}
|