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

Version Path
foreman_ansible-15.0.2 app/jobs/import_playbooks_job/async/sync_playbooks.rb
foreman_ansible-15.0.1 app/jobs/import_playbooks_job/async/sync_playbooks.rb
foreman_ansible-15.0.0 app/jobs/import_playbooks_job/async/sync_playbooks.rb
foreman_ansible-14.2.2 app/jobs/sync_playbooks.rb
foreman_ansible-14.2.1 app/jobs/sync_playbooks.rb
foreman_ansible-13.0.7 app/jobs/sync_playbooks.rb
foreman_ansible-14.2.0 app/jobs/sync_playbooks.rb
foreman_ansible-14.1.1 app/jobs/sync_playbooks.rb
foreman_ansible-14.1.0 app/jobs/sync_playbooks.rb
foreman_ansible-13.0.5 app/jobs/sync_playbooks.rb
foreman_ansible-14.0.0 app/jobs/sync_playbooks.rb
foreman_ansible-13.0.4 app/jobs/sync_playbooks.rb
foreman_ansible-13.0.3 app/jobs/sync_playbooks.rb
foreman_ansible-13.0.2 app/jobs/sync_playbooks.rb
foreman_ansible-13.0.1 app/jobs/sync_playbooks.rb
foreman_ansible-13.0.0 app/jobs/sync_playbooks.rb
foreman_ansible-12.0.7 app/jobs/sync_playbooks.rb
foreman_ansible-10.4.4 app/jobs/sync_playbooks.rb
foreman_ansible-7.1.8 app/jobs/sync_playbooks.rb
foreman_ansible-12.0.6 app/jobs/sync_playbooks.rb