Skip to content

Commit 5f7087e

Browse files
committed
Set /tmp as default CWD for postgresql_psql
This has been discussed in issue puppetlabs#148. The postgresql_psql type doesn't change the CWD to something safe when running psql as the postgres user. During a regular puppet run the CWD remains "/root", to which the postgres user usually does not have access, resulting in failed psql calls and failed puppet runs. This simple change makes "/tmp" the default CWD for postgresql_psql.
1 parent 572f090 commit 5f7087e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/puppet/type/postgresql_psql.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ def sync(refreshing = false)
6666

6767
newparam(:cwd, :parent => Puppet::Parameter::Path) do
6868
desc "The working directory under which the psql command should be executed."
69+
defaultto("/tmp")
6970
end
7071

7172
newparam(:refreshonly) do

0 commit comments

Comments
 (0)