Move group_limit & group_wait under boot

Also make formatting the group strategy the responsibility of the
commander.
This commit is contained in:
Kevin McConnell
2023-04-14 11:01:25 +01:00
parent 100b72e4b4
commit a8726be20e
6 changed files with 29 additions and 23 deletions

View File

@@ -51,6 +51,14 @@ class Mrsk::Commander
end
end
def group_strategy
if config.boot.group_limit.present?
{ in: :groups, limit: config.boot.group_limit, wait: config.boot.group_wait }
else
{}
end
end
def roles_on(host)
roles.select { |role| role.hosts.include?(host.to_s) }.map(&:name)
end