Skip to content

Instantly share code, notes, and snippets.

@rurounijones
Last active December 19, 2015 02:29
Show Gist options
  • Save rurounijones/5883385 to your computer and use it in GitHub Desktop.
Save rurounijones/5883385 to your computer and use it in GitHub Desktop.
// 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