From 1606c8b7be8938d6a32d8920510f6c01ebe24591 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sat, 9 Oct 2010 17:16:02 -0300 Subject: Undef workaround --- manifests/init.pp | 11 ++++++----- 1 file 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, } -- cgit v1.2.3