X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=lib%2Fmcollective%2Frpc%2Fagent.rb;h=857cc76fc4d736b35b5aeabc2bfd149ba2b3aa9b;hb=d1f1649ba43c5cbc43c4beb2380096ba051d646a;hp=d2cf043d40c3bd5409440534842133b730b4b1ea;hpb=b87d2f4e68281062df1913440ca5753ae63314a9;p=packages%2Fprecise%2Fmcollective.git diff --git a/lib/mcollective/rpc/agent.rb b/lib/mcollective/rpc/agent.rb index d2cf043..857cc76 100644 --- a/lib/mcollective/rpc/agent.rb +++ b/lib/mcollective/rpc/agent.rb @@ -67,7 +67,7 @@ module MCollective begin # Incoming requests need to be validated against the DDL thus reusing - # all the work users put into creating DDLs and creating a consistant + # all the work users put into creating DDLs and creating a consistent # quality of input validation everywhere with the a simple once off # investment of writing a DDL @request.validate! @@ -144,17 +144,13 @@ module MCollective log_code(:PLMC37, "Starting default activation checks for the '%{agent}' agent", :debug, :agent => agent_name) - should_activate = Config.instance.pluginconf["#{agent_name}.activate_agent"] + should_activate = Util.str_to_bool(Config.instance.pluginconf.fetch("#{agent_name}.activate_agent", true)) - if should_activate + unless should_activate log_code(:PLMC38, "Found plugin configuration '%{agent}.activate_agent' with value '%{should_activate}'", :debug, :agent => agent_name, :should_activate => should_activate) - - unless should_activate =~ /^1|y|true$/ - return false - end end - return true + return should_activate end # Returns an array of actions this agent support