don't recreate bare repo if it exists already (fixes #12303)
authorAndreas Gerstmayr <andreas@andreasgerstmayr.at>
Sun, 26 Feb 2012 17:15:10 +0000 (18:15 +0100)
committerAndreas Gerstmayr <andreas@andreasgerstmayr.at>
Sun, 26 Feb 2012 17:15:10 +0000 (18:15 +0100)
lib/puppet/type/vcsrepo.rb

index 9824726..2792cfe 100644 (file)
@@ -40,6 +40,8 @@ Puppet::Type.newtype(:vcsrepo) do
           else
             return false
           end
+               when :bare
+                 return is == :bare
       end
     end
 
@@ -48,7 +50,9 @@ Puppet::Type.newtype(:vcsrepo) do
     end
 
     newvalue :bare, :required_features => [:bare_repositories] do
-      provider.create
+         if !provider.exists?
+        provider.create
+      end
     end
 
     newvalue :absent do