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
46
47
|
# File 'modules/admin/manifests/group.pp', line 18
define admin::group(
$ensure = 'present',
$gid = undef,
$privileges = [],
)
{
# sans specified $gid we assume system group and do not create
if ($ensure == 'absent') or ($gid) {
group { $name:
ensure => $ensure,
name => $name,
allowdupe => false,
gid => $gid,
}
}
# If specified privilege is empty we manage
# separately from the group as a whole and cleanup
if empty($privileges) {
$privileges_ensure = 'absent'
} else {
$privileges_ensure = $ensure
}
sudo::group { $name:
ensure => $privileges_ensure,
privileges => $privileges,
}
}
|