improve some resource management
authormh <mh@immerda.ch>
Mon, 14 Feb 2011 23:34:58 +0000 (00:34 +0100)
committermh <mh@immerda.ch>
Mon, 14 Feb 2011 23:34:58 +0000 (00:34 +0100)
manifests/managed.pp

index 9a278e1..709a790 100644 (file)
@@ -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;