diff --git a/lib/mcollective/ddl/discoveryddl.rb b/lib/mcollective/ddl/discoveryddl.rb index 73cd28ab..8ea09f8b 100644 --- a/lib/mcollective/ddl/discoveryddl.rb +++ b/lib/mcollective/ddl/discoveryddl.rb @@ -11,7 +11,7 @@ module DDL # :timeout => 2 # # discovery do - # capabilities [:classes, :facts, :identity, :agents, :compound] + # capabilities [:classes, :facts, :identity, :agents, :compound, :federations] # end class DiscoveryDDL < Base def discovery_interface @@ -25,10 +25,10 @@ def capabilities(*caps) raise "Discovery plugin capabilities can't be empty" if caps.empty? caps.each do |cap| - if [:classes, :facts, :identity, :agents, :compound].include?(cap) + if [:classes, :facts, :identity, :agents, :compound, :federations].include?(cap) @entities[:discovery][:capabilities] << cap else - raise "%s is not a valid capability, valid capabilities are :classes, :facts, :identity, :agents and :compound" % cap + raise "%s is not a valid capability, valid capabilities are :classes, :facts, :identity, :agents, :compound, and :federations" % cap end end end diff --git a/lib/mcollective/discovery/external.ddl b/lib/mcollective/discovery/external.ddl index a9b2a70c..dc2a039d 100644 --- a/lib/mcollective/discovery/external.ddl +++ b/lib/mcollective/discovery/external.ddl @@ -7,7 +7,7 @@ metadata :name => "external", :timeout => 2 discovery do - capabilities [:classes, :facts, :identity, :agents, :compound] + capabilities [:classes, :facts, :identity, :agents, :compound, :federations] end diff --git a/lib/mcollective/util.rb b/lib/mcollective/util.rb index f6a80a0a..f4e416b3 100644 --- a/lib/mcollective/util.rb +++ b/lib/mcollective/util.rb @@ -217,7 +217,7 @@ def self.default_options :discovery_method => nil, :discovery_options => Config.instance.default_discovery_options, :filter => empty_filter, - :federations => [] + :federations => Config.instance.federations } end diff --git a/lib/mcollective/util/playbook/nodes/mcollective_nodes.rb b/lib/mcollective/util/playbook/nodes/mcollective_nodes.rb index 3f0bb939..fbae609d 100644 --- a/lib/mcollective/util/playbook/nodes/mcollective_nodes.rb +++ b/lib/mcollective/util/playbook/nodes/mcollective_nodes.rb @@ -9,6 +9,7 @@ def initialize @facts = [] @classes = [] @identity = [] + @federations = [] @compound = nil end