diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2010-10-09 17:16:02 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2010-10-09 17:16:02 -0300 |
commit | 1606c8b7be8938d6a32d8920510f6c01ebe24591 (patch) | |
tree | 84b9444cf4254513ede8fbe2725a855d56626ecf | |
parent | 4e12693b5776551c8c10675392bfe582055710fd (diff) | |
download | puppet-user-1606c8b7be8938d6a32d8920510f6c01ebe24591.tar.gz puppet-user-1606c8b7be8938d6a32d8920510f6c01ebe24591.tar.bz2 |
Undef workaround
-rw-r--r-- | manifests/init.pp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/manifests/init.pp b/manifests/init.pp index d1458df..bf1f658 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -86,7 +86,7 @@ class user { if $uid != 'absent' { $real_uid = $uid } else { - $real_uid = undef + $real_uid = false } if $gid != 'absent' { @@ -94,15 +94,16 @@ class user { if $uid != 'absent' { $real_gid = $uid } else { - $real_gid = undef + $real_gid = false } } else { $real_gid = $gid } } else { - $real_gid = undef + $real_gid = false } + # see http://www.mail-archive.com/puppet-users@googlegroups.com/msg00795.html user { "$title": ensure => $ensure, allowdupe => false, @@ -113,8 +114,8 @@ class user { groups => $real_groups, membership => $membership, password => $password, - uid => $real_uid, - gid => $real_gid, + uid => $real_uid ? { false => undef, default => $real_uid } + gid => $real_gid ? { false => undef, default => $real_gid } tag => $tag, } |