Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

agent_registration - Search all recipes on a node for zabbix::server #131

Open
iandelahorne opened this issue Jan 2, 2014 · 4 comments
Open
Assignees

Comments

@iandelahorne
Copy link
Contributor

If a role containing recipe[zabbix::server] is in the run_list of a node, the
node won't be found by searching for recipe:zabbix::server. Instead, search
for recipes:zabbix::server.

Ideally this would be a role (configurable in attributes) we search for instead
of just looking for the recipe.

Attached a diff since my master is out of sync.

diff --git a/recipes/agent_registration.rb b/recipes/agent_registration.rb
index 260d55e..ab3c36f 100644
--- a/recipes/agent_registration.rb
+++ b/recipes/agent_registration.rb
@@ -6,7 +6,7 @@
 #

 unless Chef::Config[:solo]
-  zabbix_server = search(:node, "recipe:zabbix\\:\\:server").first
+  zabbix_server = search(:node, "recipes:zabbix\\:\\:server").first
 else
   if node['zabbix']['web']['fqdn']
     zabbix_server = node
@ghost ghost assigned guilhem Jan 6, 2014
@laradji
Copy link
Owner

laradji commented Jan 6, 2014

Hi @lflux
Thanks for your merge request, @guilhem your the master of this part of the code can you review it ?

@guilhem
Copy link
Collaborator

guilhem commented Jan 6, 2014

I agree with "recipes" instead of "recipe".

This was changed in past 25da455 without any good reason (I think)

@guilhem guilhem closed this as completed Feb 6, 2014
@guilhem
Copy link
Collaborator

guilhem commented Feb 6, 2014

sorry my bad

@guilhem guilhem reopened this Feb 6, 2014
@guilhem
Copy link
Collaborator

guilhem commented Feb 9, 2014

#141 must fix this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants