diff --git a/files/gitlab-cookbooks/gitlab/recipes/postgresql.rb b/files/gitlab-cookbooks/gitlab/recipes/postgresql.rb index c6e02e9..a375a8d 100644 --- a/files/gitlab-cookbooks/gitlab/recipes/postgresql.rb +++ b/files/gitlab-cookbooks/gitlab/recipes/postgresql.rb @@ -142,13 +142,13 @@ db_name = "gitlabhq_production" sql_user = node['gitlab']['postgresql']['sql_user'] sql_user_passwd = node['gitlab']['postgresql']['sql_password'] -execute "#{bin_dir}/psql --port #{pg_port} -d '#{db_name}' -c \"CREATE USER #{sql_user} WITH ENCRYPTED PASSWORD '#{sql_user_passwd}'\"" do +execute "#{bin_dir}/psql --port #{pg_port} -d template1 -c \"CREATE USER #{sql_user} WITH ENCRYPTED PASSWORD '#{sql_user_passwd}'\"" do user pg_user not_if { !pg_helper.is_running? || pg_helper.sql_user_exists? } end execute "create #{db_name} database" do - command "#{bin_dir}/createdb -T template0 --port #{pg_port} -E UTF-8 -O #{sql_user} #{db_name}" + command "#{bin_dir}/createdb --port #{pg_port} -E UTF-8 -O #{sql_user} #{db_name}" user pg_user not_if { !pg_helper.is_running? || pg_helper.database_exists?(db_name) } retries 30 -- libgit2 0.21.2