X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/90a349e0bc558441e65156eabb585c578d93fbfd..18424e9038b5f06d815167da8f0c10bed5d5d211:/cookbooks/postgresql/providers/tablespace.rb diff --git a/cookbooks/postgresql/providers/tablespace.rb b/cookbooks/postgresql/providers/tablespace.rb index a2d4af925..22ff39600 100644 --- a/cookbooks/postgresql/providers/tablespace.rb +++ b/cookbooks/postgresql/providers/tablespace.rb @@ -30,14 +30,16 @@ end action :create do unless @pg.tablespaces.include?(new_resource.tablespace) - @pg.execute(:command => "CREATE TABLESPACE #{new_resource.tablespace} LOCATION '#{new_resource.location}'") - new_resource.updated_by_last_action(true) + converge_by "create tablespace #{new_resource.tablespace}" do + @pg.execute(:command => "CREATE TABLESPACE #{new_resource.tablespace} LOCATION '#{new_resource.location}'") + end end end action :drop do if @pg.tablespaces.include?(new_resource.tablespace) - @pg.execute(:command => "DROP TABLESPACE #{new_resource.tablespace}") - new_resource.updated_by_last_action(true) + converge_by "drop tablespace #{new_resource.tablespace}" do + @pg.execute(:command => "DROP TABLESPACE #{new_resource.tablespace}") + end end end