Setting a postgresql password with Vagrant / Chef-solo

I first tried my hand at chef-solo in the Vagrant window for my open source apartment project so that contributors could more easily get dev env and work.

One thing that I can’t achieve yet is overriding the default password set by the postgresql recipe from this cookbook

The docs mention setting json config with something like:

 postgresql: { password: { postgres: '' } } 

which I did here , but I can’t get him to override the default encrypted password given by prescription.

I am completely new (as of today) for a chef / stroller, so I got a little lost as to where I should look further.

Any help is greatly appreciated.

+1
source share
1 answer

I cloned your gem and ran Vagrant (but using the Squeeze Debian image that I already downloaded, and all disabled recipes except postgresql and postgresql::server , and using PostgreSQL 8.4 instead of 9.1), and it seems that an empty password was a bad choice using

  postgresql: { password: { postgres: 'foo' } } 

works with the command PGPASSWORD="foo" psql --username=postgres -h localhost , so I suspect the empty password has some problems.

+5
source

All Articles