Skip to content
This repository has been archived by the owner on Jul 11, 2020. It is now read-only.

Commit

Permalink
Restructure host lookup data bag
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Kottler committed Jul 19, 2014
1 parent 2e19c20 commit d66fe85
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Berksfile.lock
Expand Up @@ -190,7 +190,7 @@ GRAPH
rubygems-sensu (>= 0.0.0)
rubygems-ssh (>= 0.0.0)
rubygems-utility (>= 0.0.0)
rubygems-app (0.0.27)
rubygems-app (0.0.28)
apt (>= 0.0.0)
chef-vault (>= 0.0.0)
git (>= 0.0.0)
Expand Down
2 changes: 1 addition & 1 deletion cookbooks/rubygems-app/metadata.rb
@@ -1,6 +1,6 @@
name 'rubygems-app'

version '0.0.27'
version '0.0.28'

depends 'apt'
depends 'chef-vault'
Expand Down
2 changes: 1 addition & 1 deletion cookbooks/rubygems-app/recipes/config.rb
Expand Up @@ -5,7 +5,7 @@

include_recipe 'chef-vault'

dbhost = data_bag_item('database', 'hosts')['environments'][node.chef_environment]
dbhost = data_bag_item('hosts', 'database')['environments'][node.chef_environment]

secrets = chef_vault_item('rubygems', node.chef_environment)
db_host = search(:node, "name:#{dbhost}.#{node.chef_environment}.rubygems.org")[0]
Expand Down
@@ -1,5 +1,5 @@
{
"id": "hosts",
"id": "database",
"environments": {
"staging": "db01",
"production": "db03"
Expand Down

0 comments on commit d66fe85

Please sign in to comment.