]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/postgresql/providers/extension.rb
Update piwik to 3.1.0
[chef.git] / cookbooks / postgresql / providers / extension.rb
index 848b7630ec745e4d347fad9877a72819cb151b9d..87580699013f1552918cf5f1a69f9279cf40f66a 100644 (file)
@@ -31,14 +31,16 @@ end
 
 action :create do
   unless @pg.extensions(new_resource.database).include?(new_resource.extension)
 
 action :create do
   unless @pg.extensions(new_resource.database).include?(new_resource.extension)
-    @pg.execute(:command => "CREATE EXTENSION #{new_resource.extension}", :database => new_resource.database)
-    new_resource.updated_by_last_action(true)
+    converge_by "create extension #{new_resource.extension}" do
+      @pg.execute(:command => "CREATE EXTENSION #{new_resource.extension}", :database => new_resource.database)
+    end
   end
 end
 
 action :drop do
   if @pg.extensions(new_resource.database).include?(new_resource.extension)
   end
 end
 
 action :drop do
   if @pg.extensions(new_resource.database).include?(new_resource.extension)
-    @pg.execute(:command => "DROP EXTENSION #{new_resource.extension}", :database => new_resource.database)
-    new_resource.updated_by_last_action(true)
+    converge_by "drop extension #{new_resource.extension}" do
+      @pg.execute(:command => "DROP EXTENSION #{new_resource.extension}", :database => new_resource.database)
+    end
   end
 end
   end
 end