Since we're overriding retrieve anyhow, make all the values for ensure explicit
authorBruce Williams <bruce@codefluency.com>
Sun, 14 Mar 2010 23:57:59 +0000 (16:57 -0700)
committerBruce Williams <bruce@codefluency.com>
Sun, 14 Mar 2010 23:57:59 +0000 (16:57 -0700)
lib/puppet/type/vcsrepo.rb

index aae65a1..a722152 100644 (file)
@@ -13,12 +13,19 @@ Puppet::Type.newtype(:vcsrepo) do
 
 
   ensurable do
-    defaultvalues
+
+    newvalue :present do
+      provider.create
+    end
 
     newvalue :bare, :required_features => [:bare_repositories] do
       provider.create
     end
 
+    newvalue :absent do
+      provider.destroy
+    end
+
     def retrieve
       prov = @resource.provider
       if prov