Sha256: b8ffb9b016d02a63208a88c07ac49ad818b6100a01253679817b3eb10f0cd85a

Contents?: true

Size: 673 Bytes

Versions: 104

Compression:

Stored size: 673 Bytes

Contents

# frozen_string_literal: true

module ForemanAnsible
  module Concerns
    # Helpers to compose the JobInvocation in other controllers
    module JobInvocationHelper
      extend ActiveSupport::Concern

      def job_composer(feature_name, target)
        composer = ::JobInvocationComposer.for_feature(feature_name, target)
        return composer if composer.save
        msg = if target.blank?
                N_('There are no Ansible roles to play')
              else
                format(N_('Could not run Ansible roles for %{host}'),
                       :host => target)
              end
        raise ::Foreman::Exception.new(msg)
      end
    end
  end
end

Version data entries

104 entries across 104 versions & 1 rubygems

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