summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2016-03-31 11:40:17 -0300
committerSilvio Rhatto <rhatto@riseup.net>2016-03-31 11:40:17 -0300
commit0c9682fa2832b92262093aedb5371653a6a441c4 (patch)
tree2d4c61e6e5493111ef1c61ad7ce755050232e4a0 /manifests
parent61ea881d6b7ca9ea82eff718d87f1a0e920b8c0d (diff)
downloadpuppet-user-0c9682fa2832b92262093aedb5371653a6a441c4.tar.gz
puppet-user-0c9682fa2832b92262093aedb5371653a6a441c4.tar.bz2
Fix managehome handling
Diffstat (limited to 'manifests')
-rw-r--r--manifests/manage.pp12
1 files changed, 8 insertions, 4 deletions
diff --git a/manifests/manage.pp b/manifests/manage.pp
index e0f2d01..d65266d 100644
--- a/manifests/manage.pp
+++ b/manifests/manage.pp
@@ -23,7 +23,7 @@ define user::manage(
$ticket = false) {
$real_groups = $groups ? {
- '' => [ "$title", ],
+ '' => [ "$title", ],
default => $groups,
}
@@ -51,6 +51,8 @@ define user::manage(
}
if $managehome == true {
+ $real_managehome = true
+
if $ensure == 'absent' {
file{ "$real_homedir":
ensure => absent,
@@ -79,6 +81,8 @@ define user::manage(
}
}
} else {
+ $real_managehome = false
+
if $managehome != false {
if !defined(File[$managehome]) {
file { $managehome:
@@ -103,8 +107,8 @@ define user::manage(
}
file{ "$real_homedir":
- ensure => $managehome,
- require => File[$managehome],
+ ensure => $managehome,
+ require => File[$managehome],
}
}
}
@@ -128,7 +132,7 @@ define user::manage(
allowdupe => false,
comment => "$real_name_comment",
home => $real_homedir,
- managehome => $managehome,
+ managehome => $real_managehome,
shell => $real_shell,
groups => $real_groups,
membership => $membership,