Use the regular SQL schema (not the new one for all vhosts into one db)

This commit is contained in:
Greg Karékinian
2019-05-14 11:24:08 +02:00
parent d9390a4b92
commit bd720b0189
2 changed files with 17 additions and 649 deletions

View File

@@ -26,8 +26,8 @@
include_recipe "kosmos-postgresql"
cookbook_file "#{Chef::Config[:file_cache_path]}/pg.new.sql" do
source "pg.new.sql"
cookbook_file "#{Chef::Config[:file_cache_path]}/pg.sql" do
source "pg.sql"
mode "0664"
end
@@ -57,12 +57,24 @@ end
postgresql_database 'ejabberd' do
owner 'ejabberd'
action :create
notifies :run, "execute[create db schema]", :delayed
notifies :run, "execute[create db schema ejabberd]", :delayed
end
execute "create db schema" do
postgresql_database 'ejabberd_5apps' do
owner 'ejabberd'
action :create
notifies :run, "execute[create db schema ejabberd_5apps]", :delayed
end
execute "create db schema ejabberd" do
user "ejabberd"
command "psql ejabberd < #{Chef::Config[:file_cache_path]}/pg.new.sql"
command "psql ejabberd < #{Chef::Config[:file_cache_path]}/pg.sql"
action :nothing
end
execute "create db schema ejabberd_5apps" do
user "ejabberd"
command "psql ejabberd_5apps < #{Chef::Config[:file_cache_path]}/pg.sql"
action :nothing
end