Skip to content

Instantly share code, notes, and snippets.

@rurounijones
Created May 17, 2013 00:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rurounijones/5596193 to your computer and use it in GitHub Desktop.
Save rurounijones/5596193 to your computer and use it in GitHub Desktop.
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