summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2008-12-02 00:30:12 +0000
committermh <mh@immerda.ch>2008-12-02 00:30:12 +0000
commit795a719e019e5682f4c8bdc821ee0ae1a3aa2058 (patch)
treea6f1e6b878bd96634f3d09ce843d339c8cd2996e
parentac77885abe3845568fc94644baacad490248b475 (diff)
optionaly disable group managing
-rw-r--r--manifests/defines.pp24
1 files changed, 14 insertions, 10 deletions
diff --git a/manifests/defines.pp b/manifests/defines.pp
index e871301..bc5793a 100644
--- a/manifests/defines.pp
+++ b/manifests/defines.pp
@@ -18,11 +18,14 @@
# absent: let the system take a gid (*default*)
# uid: take the same as the uid has if it isn't absent
# <value>: take this gid
+# manage_group: Wether we should add a group with the same name as well
+# Default: true
define user::managed(
$name_comment = 'absent',
$uid = 'absent',
$gid = 'absent',
$groups = [],
+ $manage_group = 'true',
$membership = 'minimum',
$homedir = 'absent',
$managehome = 'true',
@@ -121,16 +124,17 @@ define user::managed(
case $name {
root: {}
default: {
-# User[$name]{
-# require => Group[$name],
-# }
- group { $name:
- allowdupe => false,
- ensure => present,
- }
- if $real_gid {
- Group[$name]{
- gid => $real_gid,
+ case $manage_group {
+ 'true': {
+ group { $name:
+ allowdupe => false,
+ ensure => present,
+ }
+ if $real_gid {
+ Group[$name]{
+ gid => $real_gid,
+ }
+ }
}
}
}