File tree Expand file tree Collapse file tree 1 file changed +1
-15
lines changed Expand file tree Collapse file tree 1 file changed +1
-15
lines changed Original file line number Diff line number Diff line change 75
75
notifies change_notify , 'service[postgresql]' , :immediately
76
76
end
77
77
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
+
You can’t perform that action at this time.
0 commit comments