Skip to content

Commit

Permalink
clean up searches on role directly
Browse files Browse the repository at this point in the history
  • Loading branch information
schisamo committed Jun 1, 2011
1 parent 6a42470 commit d10940e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion application/recipes/django.rb
Expand Up @@ -107,7 +107,7 @@
dbm = node
else
# Find the database master
results = search(:node, "run_list:role\\[#{app["database_master_role"][0]}\\] AND chef_environment:#{node.chef_environment}", nil, 0, 1)
results = search(:node, "role:#{app["database_master_role"][0]} AND chef_environment:#{node.chef_environment}", nil, 0, 1)
rows = results[0]
if rows.length == 1
dbm = rows[0]
Expand Down
2 changes: 1 addition & 1 deletion application/recipes/java_webapp.rb
Expand Up @@ -75,7 +75,7 @@
dbm = node
else
# Find the database master
results = search(:node, "run_list:role\\[#{app["database_master_role"][0]}\\] AND chef_environment:#{node.chef_environment}", nil, 0, 1)
results = search(:node, "role:#{app["database_master_role"][0]} AND chef_environment:#{node.chef_environment}", nil, 0, 1)
rows = results[0]
if rows.length == 1
dbm = rows[0]
Expand Down
2 changes: 1 addition & 1 deletion application/recipes/php.rb
Expand Up @@ -98,7 +98,7 @@
dbm = node
else
# Find the database master
results = search(:node, "run_list:role\\[#{app['database_master_role'][0]}\\] AND chef_environment:#{node.chef_environment}", nil, 0, 1)
results = search(:node, "role:#{app["database_master_role"][0]} AND chef_environment:#{node.chef_environment}", nil, 0, 1)
rows = results[0]
if rows.length == 1
dbm = rows[0]
Expand Down
2 changes: 1 addition & 1 deletion application/recipes/rails.rb
Expand Up @@ -103,7 +103,7 @@
dbm = node
else
# Find the database master
results = search(:node, "run_list:role\\[#{app["database_master_role"][0]}\\] AND chef_environment:#{node.chef_environment}", nil, 0, 1)
results = search(:node, "role:#{app["database_master_role"][0]} AND chef_environment:#{node.chef_environment}", nil, 0, 1)
rows = results[0]
if rows.length == 1
dbm = rows[0]
Expand Down

0 comments on commit d10940e

Please sign in to comment.