From 0293727883bcd79bf2812a252b1bbba468ccf800 Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Thu, 30 Jan 2014 15:14:47 +0100 Subject: [PATCH] Remove sql_ro_user --- files/gitlab-cookbooks/gitlab/attributes/default.rb | 2 -- files/gitlab-cookbooks/gitlab/recipes/postgresql.rb | 16 ---------------- 2 files changed, 0 insertions(+), 18 deletions(-) diff --git a/files/gitlab-cookbooks/gitlab/attributes/default.rb b/files/gitlab-cookbooks/gitlab/attributes/default.rb index 4da1f2e..a994a25 100644 --- a/files/gitlab-cookbooks/gitlab/attributes/default.rb +++ b/files/gitlab-cookbooks/gitlab/attributes/default.rb @@ -33,8 +33,6 @@ default['gitlab']['postgresql']['home'] = "/var/opt/gitlab/postgresql" default['gitlab']['postgresql']['user_path'] = "/opt/gitlab/embedded/bin:/opt/gitlab/bin:$PATH" default['gitlab']['postgresql']['sql_user'] = "gitlab" default['gitlab']['postgresql']['sql_password'] = "snakepliskin" -default['gitlab']['postgresql']['sql_ro_user'] = "opscode_chef_ro" -default['gitlab']['postgresql']['sql_ro_password'] = "shmunzeltazzen" default['gitlab']['postgresql']['vip'] = "127.0.0.1" default['gitlab']['postgresql']['port'] = 5432 default['gitlab']['postgresql']['listen_address'] = 'localhost' diff --git a/files/gitlab-cookbooks/gitlab/recipes/postgresql.rb b/files/gitlab-cookbooks/gitlab/recipes/postgresql.rb index 3e18452..187765c 100644 --- a/files/gitlab-cookbooks/gitlab/recipes/postgresql.rb +++ b/files/gitlab-cookbooks/gitlab/recipes/postgresql.rb @@ -163,19 +163,3 @@ execute "grant #{db_name} privileges" do user pg_user action :nothing end - -sql_ro_user = node['gitlab']['postgresql']['sql_ro_user'] -sql_ro_user_passwd = node['gitlab']['postgresql']['sql_ro_password'] - -execute "#{bin_dir}/psql --port #{pg_port} -d '#{db_name}' -c \"CREATE USER #{sql_ro_user} WITH SUPERUSER ENCRYPTED PASSWORD '#{sql_ro_user_passwd}'\"" do - cwd chef_db_dir - user pg_user - notifies :run, "execute[grant #{db_name}_ro privileges]", :immediately - not_if { !pg_helper.is_running? || pg_helper.sql_ro_user_exists? } -end - -execute "grant #{db_name}_ro privileges" do - command "#{bin_dir}/psql --port #{pg_port} -d '#{db_name}' -c \"GRANT ALL PRIVILEGES ON DATABASE #{db_name} TO #{sql_ro_user}\"" - user pg_user - action :nothing -end -- libgit2 0.21.2