optionaly disable group managing

This commit is contained in:
mh 2008-12-02 00:30:12 +00:00
parent ac77885abe
commit 795a719e01

View file

@ -18,11 +18,14 @@
# absent: let the system take a gid (*default*) # absent: let the system take a gid (*default*)
# uid: take the same as the uid has if it isn't absent # uid: take the same as the uid has if it isn't absent
# <value>: take this gid # <value>: take this gid
# manage_group: Wether we should add a group with the same name as well
# Default: true
define user::managed( define user::managed(
$name_comment = 'absent', $name_comment = 'absent',
$uid = 'absent', $uid = 'absent',
$gid = 'absent', $gid = 'absent',
$groups = [], $groups = [],
$manage_group = 'true',
$membership = 'minimum', $membership = 'minimum',
$homedir = 'absent', $homedir = 'absent',
$managehome = 'true', $managehome = 'true',
@ -121,16 +124,17 @@ define user::managed(
case $name { case $name {
root: {} root: {}
default: { default: {
# User[$name]{ case $manage_group {
# require => Group[$name], 'true': {
# } group { $name:
group { $name: allowdupe => false,
allowdupe => false, ensure => present,
ensure => present, }
} if $real_gid {
if $real_gid { Group[$name]{
Group[$name]{ gid => $real_gid,
gid => $real_gid, }
}
} }
} }
} }