summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--manifests/manage.pp57
1 files changed, 29 insertions, 28 deletions
diff --git a/manifests/manage.pp b/manifests/manage.pp
index 6d24521..e0f2d01 100644
--- a/manifests/manage.pp
+++ b/manifests/manage.pp
@@ -43,40 +43,41 @@ define user::manage(
}
$real_shell = $shell ? {
- 'absent' => $operatingsystem ? {
- openbsd => "/usr/local/bin/bash",
- default => "/bin/bash",
- },
+ 'absent' => $operatingsystem ? {
+ openbsd => "/usr/local/bin/bash",
+ default => "/bin/bash",
+ },
default => $shell,
}
if $managehome == true {
- if $ensure == 'absent' {
- file{"$real_homedir":
- ensure => absent,
- purge => true,
- force => true,
- recurse => true,
- }
- } else {
- file{"$real_homedir":
- ensure => directory,
- require => User[$name],
- owner => $name, mode => $homedir_mode;
+ if $ensure == 'absent' {
+ file{ "$real_homedir":
+ ensure => absent,
+ purge => true,
+ force => true,
+ recurse => true,
+ }
+ } else {
+ file{ "$real_homedir":
+ ensure => directory,
+ require => User[$name],
+ owner => $name,
+ mode => $homedir_mode;
+ }
+ case $gid {
+ 'absent','uid': {
+ File[$real_homedir]{
+ group => $name,
}
- case $gid {
- 'absent','uid': {
- File[$real_homedir]{
- group => $name,
- }
- }
- default: {
- File[$real_homedir]{
- group => $gid,
- }
- }
+ }
+ default: {
+ File[$real_homedir]{
+ group => $gid,
}
+ }
}
+ }
} else {
if $managehome != false {
if !defined(File[$managehome]) {
@@ -132,7 +133,7 @@ define user::manage(
groups => $real_groups,
membership => $membership,
password => $password,
- uid => $uid ? { false => undef, default => $uid },
+ uid => $uid ? { false => undef, default => $uid },
gid => $real_gid ? { false => undef, default => $real_gid },
}