Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// This is a json file used by chef-solo with the -j option
{
"postgresql" : {
"pg_hba": [
{ "type":"host", "db":"all", "user":"master", "addr":"10.80.79.0/24", "method":"md5"}
]
}
}
# This is a recipe file
default_db_users = [
{ :type => 'host', :db => 'all', :user => 'postgres', :addr => '127.0.0.1/32', :method => 'md5'},
{ :type => 'host', :db => 'all', :user => 'administrator', :addr => '192.168.80.10/32', :method => 'md5' },
{ :type => 'host', :db => 'all', :user => 'connector', :addr => '127.0.0.1/32', :method => 'md5' }
]
node.force_override['postgresql']['pg_hba'] = default_db_users + node['postgresql']['pg_hba']
include_recipe "postgresql::server"
include_recipe "postgresql::ruby"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.