summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2010-10-09 16:58:06 -0300
committerSilvio Rhatto <rhatto@riseup.net>2010-10-09 16:58:06 -0300
commit4e12693b5776551c8c10675392bfe582055710fd (patch)
tree734fe778ff0948457bd49583273f7221e50867a9
parent3dabd8a76dd15dadc1b9fe9429a476cb7a7d182c (diff)
downloadpuppet-user-4e12693b5776551c8c10675392bfe582055710fd.tar.gz
puppet-user-4e12693b5776551c8c10675392bfe582055710fd.tar.bz2
Fix uid and gid assignments
-rw-r--r--manifests/init.pp27
1 files changed, 14 insertions, 13 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 120f147..d1458df 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -84,24 +84,23 @@ class user {
}
if $uid != 'absent' {
- User[$name]{
- uid => $uid,
- }
+ $real_uid = $uid
+ } else {
+ $real_uid = undef
}
if $gid != 'absent' {
- if $gid == 'uid' {
- if $uid != 'absent' {
- $real_gid = $uid
- }
+ if $gid == 'uid' {
+ if $uid != 'absent' {
+ $real_gid = $uid
} else {
- $real_gid = $gid
- }
- if $real_gid {
- User[$name]{
- gid => $real_gid,
- }
+ $real_gid = undef
}
+ } else {
+ $real_gid = $gid
+ }
+ } else {
+ $real_gid = undef
}
user { "$title":
@@ -114,6 +113,8 @@ class user {
groups => $real_groups,
membership => $membership,
password => $password,
+ uid => $real_uid,
+ gid => $real_gid,
tag => $tag,
}