diff --git a/manifests/managed.pp b/manifests/managed.pp index 9a278e1..709a790 100644 --- a/manifests/managed.pp +++ b/manifests/managed.pp @@ -73,15 +73,16 @@ define user::managed( if $managehome { + file{$real_homedir: } if $ensure == 'absent' { - file{"$real_homedir": + File[$real_homedir]{ ensure => absent, purge => true, force => true, recurse => true, } } else { - file{"$real_homedir": + File[$real_homedir]{ ensure => directory, require => User[$name], owner => $name, mode => $homedir_mode;