}
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":
groups => $real_groups,
membership => $membership,
password => $password,
+ uid => $real_uid,
+ gid => $real_gid,
tag => $tag,
}