Skip to content

Commit

Permalink
Merge pull request #203 from vjanelle/federations
Browse files Browse the repository at this point in the history
(#202) pass federations properly down from choria playbooks
  • Loading branch information
ripienaar authored Dec 11, 2024
2 parents 2ab851a + 1932da5 commit 6fe8dee
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions lib/mcollective/ddl/discoveryddl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/mcollective/discovery/external.ddl
Original file line number Diff line number Diff line change
Expand Up @@ -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


2 changes: 1 addition & 1 deletion lib/mcollective/util.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions lib/mcollective/util/playbook/nodes/mcollective_nodes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ def initialize
@facts = []
@classes = []
@identity = []
@federations = []
@compound = nil
end

Expand Down

0 comments on commit 6fe8dee

Please sign in to comment.