improve some resource management
This commit is contained in:
parent
3d913534ce
commit
a7513ca689
1 changed files with 3 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue