Commit 0293727883bcd79bf2812a252b1bbba468ccf800
1 parent
3800ffdd
Exists in
master
and in
17 other branches
Remove sql_ro_user
Showing
2 changed files
with
0 additions
and
18 deletions
Show diff stats
files/gitlab-cookbooks/gitlab/attributes/default.rb
... | ... | @@ -33,8 +33,6 @@ default['gitlab']['postgresql']['home'] = "/var/opt/gitlab/postgresql" |
33 | 33 | default['gitlab']['postgresql']['user_path'] = "/opt/gitlab/embedded/bin:/opt/gitlab/bin:$PATH" |
34 | 34 | default['gitlab']['postgresql']['sql_user'] = "gitlab" |
35 | 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 | 36 | default['gitlab']['postgresql']['vip'] = "127.0.0.1" |
39 | 37 | default['gitlab']['postgresql']['port'] = 5432 |
40 | 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 | 163 | user pg_user |
164 | 164 | action :nothing |
165 | 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 | ... | ... |