Sha256: 3eae964e70e3bfeca33f0da16da411552c177ffa5375c1e3ad4b63d80f83c80b
Contents?: true
Size: 733 Bytes
Versions: 53
Compression:
Stored size: 733 Bytes
Contents
module ImportPlaybooksJob module Async class SyncPlaybooks < ::Actions::EntryAction def plan(proxy_id, playbooks_names) plan_self(proxy_id: proxy_id, playbooks_names: playbooks_names) end def run playbooks_importer = ForemanAnsible::PlaybooksImporter.new(proxy) output[:result] = playbooks_importer.import_playbooks(playbooks_names) ForemanAnsible::ImportPlaybooksSuccessNotification.deliver!(task) rescue StandardError => e ForemanAnsible::ImportPlaybooksErrorNotification.new(e, task).deliver! end def proxy SmartProxy.find(input[:proxy_id]) end def playbooks_names input[:playbooks_names] end end end end
Version data entries
53 entries across 53 versions & 1 rubygems