remove link if absent
authorAndreas <andreas@immerda.ch>
Wed, 18 Nov 2009 18:22:01 +0000 (19:22 +0100)
committerMicah Anderson <micah@riseup.net>
Thu, 2 Sep 2010 22:13:55 +0000 (18:13 -0400)
manifests/defines/link.pp

index 3325e4b..7bae08a 100644 (file)
@@ -15,6 +15,12 @@ define link(
             ensure => link,
             target => "${target}"
       }
+    }else{
+      file { "$name":
+            ensure => absent,
+            recurse => true,
+            force => true
+      }
     }
 }