X-Git-Url: https://git.openstreetmap.org/chef.git/blobdiff_plain/d58406548fa7bfd73c181dc9c97081e87e3f7d20..1162f165babe85b93abe02969ea646997c0ca84e:/cookbooks/postgresql/providers/extension.rb diff --git a/cookbooks/postgresql/providers/extension.rb b/cookbooks/postgresql/providers/extension.rb index 848b7630e..875806990 100644 --- a/cookbooks/postgresql/providers/extension.rb +++ b/cookbooks/postgresql/providers/extension.rb @@ -31,14 +31,16 @@ end 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) - @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