agent_registration - Search all recipes on a node for zabbix::server
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
Hi @lflux Thanks for your merge request, @guilhem your the master of this part of the code can you review it ?
I agree with "recipes" instead of "recipe".
This was changed in past 25da4552f9ff6736a21ed142fd90dd964a4a1389 without any good reason (I think)
sorry my bad
#141 must fix this issue