Created
May 17, 2013 00:36
-
-
Save rurounijones/5596193 to your computer and use it in GitHub Desktop.
Chef json and master cookbook recipe.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"run_list": [ "recipe[connector]" ], | |
"postgresql" : { | |
"version" : "9.2", | |
"enable_pgdg_yum" : "true", | |
"password" : { | |
"postgres" : "password" | |
}, | |
"config" : { | |
"listen_addresses" : "*" | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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