Sha256: 36080f58fe2a71560de464615bd4ea811a5147141160a1283d58b7f008f4a15f
Contents?: true
Size: 630 Bytes
Versions: 14
Compression:
Stored size: 630 Bytes
Contents
module Actions module ForemanAnsible # Bulk action for running ansible roles class PlayHostsRoles < Actions::ActionWithSubPlans def plan(hosts) plan_self(:host_ids => hosts.map(&:id)) end def create_sub_plans proxy_selector = ::ForemanAnsible::ProxySelector.new input[:host_ids].map do |host_id| host = Host.find(host_id) trigger(PlayHostRoles, host, proxy_selector) end end def rescue_strategy ::Dynflow::Action::Rescue::Fail end def humanized_name _('Bulk play Ansible roles') end end end end
Version data entries
14 entries across 14 versions & 1 rubygems