Commit 0293727883bcd79bf2812a252b1bbba468ccf800

Authored by Jacob Vosmaer
1 parent 3800ffdd

Remove sql_ro_user

files/gitlab-cookbooks/gitlab/attributes/default.rb
@@ -33,8 +33,6 @@ default['gitlab']['postgresql']['home'] = "/var/opt/gitlab/postgresql" @@ -33,8 +33,6 @@ default['gitlab']['postgresql']['home'] = "/var/opt/gitlab/postgresql"
33 default['gitlab']['postgresql']['user_path'] = "/opt/gitlab/embedded/bin:/opt/gitlab/bin:$PATH" 33 default['gitlab']['postgresql']['user_path'] = "/opt/gitlab/embedded/bin:/opt/gitlab/bin:$PATH"
34 default['gitlab']['postgresql']['sql_user'] = "gitlab" 34 default['gitlab']['postgresql']['sql_user'] = "gitlab"
35 default['gitlab']['postgresql']['sql_password'] = "snakepliskin" 35 default['gitlab']['postgresql']['sql_password'] = "snakepliskin"
36 -default['gitlab']['postgresql']['sql_ro_user'] = "opscode_chef_ro"  
37 -default['gitlab']['postgresql']['sql_ro_password'] = "shmunzeltazzen"  
38 default['gitlab']['postgresql']['vip'] = "127.0.0.1" 36 default['gitlab']['postgresql']['vip'] = "127.0.0.1"
39 default['gitlab']['postgresql']['port'] = 5432 37 default['gitlab']['postgresql']['port'] = 5432
40 default['gitlab']['postgresql']['listen_address'] = 'localhost' 38 default['gitlab']['postgresql']['listen_address'] = 'localhost'
files/gitlab-cookbooks/gitlab/recipes/postgresql.rb
@@ -163,19 +163,3 @@ execute "grant #{db_name} privileges" do @@ -163,19 +163,3 @@ execute "grant #{db_name} privileges" do
163 user pg_user 163 user pg_user
164 action :nothing 164 action :nothing
165 end 165 end
166 -  
167 -sql_ro_user = node['gitlab']['postgresql']['sql_ro_user']  
168 -sql_ro_user_passwd = node['gitlab']['postgresql']['sql_ro_password']  
169 -  
170 -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  
171 - cwd chef_db_dir  
172 - user pg_user  
173 - notifies :run, "execute[grant #{db_name}_ro privileges]", :immediately  
174 - not_if { !pg_helper.is_running? || pg_helper.sql_ro_user_exists? }  
175 -end  
176 -  
177 -execute "grant #{db_name}_ro privileges" do  
178 - command "#{bin_dir}/psql --port #{pg_port} -d '#{db_name}' -c \"GRANT ALL PRIVILEGES ON DATABASE #{db_name} TO #{sql_ro_user}\""  
179 - user pg_user  
180 - action :nothing  
181 -end