diff options
-rw-r--r-- | manifests/init.pp | 27 |
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, } |