templates/postgresql/config/rubber/deploy-postgresql.rb in rubber-2.0.8 vs templates/postgresql/config/rubber/deploy-postgresql.rb in rubber-2.1.0
- old
+ new
@@ -1,6 +1,5 @@
-
namespace :rubber do
namespace :postgresql do
rubber.allow_optional_tasks(self)
@@ -56,12 +55,12 @@
create_replication_user_cmd = "CREATE USER #{env.db_replication_user} WITH NOSUPERUSER NOCREATEROLE REPLICATION"
create_replication_user_cmd << " PASSWORD '#{env.db_replication_pass}'" if env.db_replication_pass
rubber.sudo_script "create_master_db", <<-ENDSCRIPT
- sudo -u postgres psql -c "#{create_user_cmd}"
- sudo -u postgres psql -c "#{create_replication_user_cmd}"
- sudo -u postgres psql -c "CREATE DATABASE #{env.db_name} WITH OWNER #{env.db_user}"
+ sudo -i -u postgres psql -c "#{create_user_cmd}"
+ sudo -i -u postgres psql -c "#{create_replication_user_cmd}"
+ sudo -i -u postgres psql -c "CREATE DATABASE #{env.db_name} WITH OWNER #{env.db_user}"
ENDSCRIPT
end
end
send task_name
end
\ No newline at end of file