diff options
-rw-r--r-- | manifests/manage.pp | 37 |
1 files changed, 11 insertions, 26 deletions
diff --git a/manifests/manage.pp b/manifests/manage.pp index 46ba4d2..becd2e2 100644 --- a/manifests/manage.pp +++ b/manifests/manage.pp @@ -65,19 +65,12 @@ define user::manage( ensure => directory, require => User[$name], owner => $name, - mode => $homedir_mode; - } - case $gid { - 'absent','uid': { - File[$real_homedir]{ - group => $name, - } - } - default: { - File[$real_homedir]{ - group => $gid, - } - } + mode => $homedir_mode, + group => $gid ? { + 'uid' => $name, + 'absent' => $name, + 'default' => $gid, + }, } } } else { @@ -90,19 +83,11 @@ define user::manage( owner => $name, mode => $homedir_mode, require => User[$name], - } - } - - case $gid { - 'absent','uid': { - File[$managehome] { - group => $name, - } - } - default: { - File[$managehome] { - group => $gid, - } + group => $gid ? { + 'uid' => $name, + 'absent' => $name, + 'default' => $gid, + }, } } |