Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Chef json and master cookbook recipe.
{
"run_list": [ "recipe[connector]" ],
"postgresql" : {
"version" : "9.2",
"enable_pgdg_yum" : "true",
"password" : {
"postgres" : "password"
},
"config" : {
"listen_addresses" : "*"
}
}
}
# Master recipe
include_recipe "postgresql::server"
include_recipe "database::postgresql"
postgresql_connection_info = {:host => "127.0.0.1",
:port => node['postgresql']['config']['port'],
:username => 'postgres',
:password => node['postgresql']['password']['postgres']}
postgresql_database_user 'connector' do
connection postgresql_connection_info
password 'testing'
action :create
end
%w{connector_development connector_test
connector_integration connector_staging
connector_production}.each do |name|
postgresql_database name do
connection postgresql_connection_info
owner 'connector'
action :create
end
end
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.