Skip to content

Commit b8dcec7

Browse files
committed
Stop setting password to avoid read only nodes getting upset.
1 parent 0ccf352 commit b8dcec7

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

recipes/server.rb

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -75,18 +75,4 @@
7575
notifies change_notify, 'service[postgresql]', :immediately
7676
end
7777

78-
# NOTE: Consider two facts before modifying "assign-postgres-password":
79-
# (1) Passing the "ALTER ROLE ..." through the psql command only works
80-
# if passwordless authorization was configured for local connections.
81-
# For example, if pg_hba.conf has a "local all postgres ident" rule.
82-
# (2) It is probably fruitless to optimize this with a not_if to avoid
83-
# setting the same password. This chef recipe doesn't have access to
84-
# the plain text password, and testing the encrypted (md5 digest)
85-
# version is not straight-forward.
86-
bash "assign-postgres-password" do
87-
user 'postgres'
88-
code <<-EOH
89-
echo "ALTER ROLE postgres ENCRYPTED PASSWORD '#{node['postgresql']['password']['postgres']}';" | psql -p #{node['postgresql']['config']['port']}
90-
EOH
91-
action :run
92-
end
78+

0 commit comments

Comments
 (0)