Sha256: 566d77752eaeb8c2119547f3251569cc6fe04d71a22806e625ad55831a9651a3

Contents?: true

Size: 984 Bytes

Versions: 23

Compression:

Stored size: 984 Bytes

Contents

module Actions
  module ForemanAnsible
    module Helpers
      # Shared task methods between hostgroup and host roles actions
      module HostCommon
        def finalize
          return unless delegated_output[:exit_status].to_s != '0'
          error! _('Playbook execution failed')
        end

        def rescue_strategy
          ::Dynflow::Action::Rescue::Fail
        end

        def humanized_name
          _('Play Ansible roles')
        end

        def humanized_output
          continuous_output.humanize
        end

        def fill_continuous_output(continuous_output)
          delegated_output.fetch('result', []).each do |raw_output|
            continuous_output.add_raw_output(raw_output)
          end
        rescue StandardError => e
          continuous_output.add_exception(_('Error loading data from proxy'), e)
        end

        def find_options
          { :verbosity_level => Setting[:ansible_verbosity] }
        end
      end
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
foreman_ansible-2.2.14 app/lib/actions/foreman_ansible/helpers/host_common.rb
foreman_ansible-2.2.13 app/lib/actions/foreman_ansible/helpers/host_common.rb
foreman_ansible-2.2.12 app/lib/actions/foreman_ansible/helpers/host_common.rb
foreman_ansible-2.2.11 app/lib/actions/foreman_ansible/helpers/host_common.rb
foreman_ansible-2.2.10 app/lib/actions/foreman_ansible/helpers/host_common.rb
foreman_ansible-2.2.9 app/lib/actions/foreman_ansible/helpers/host_common.rb
foreman_ansible-2.2.8 app/lib/actions/foreman_ansible/helpers/host_common.rb
foreman_ansible-2.2.7 app/lib/actions/foreman_ansible/helpers/host_common.rb
foreman_ansible-2.2.6 app/lib/actions/foreman_ansible/helpers/host_common.rb
foreman_ansible-2.2.5 app/lib/actions/foreman_ansible/helpers/host_common.rb
foreman_ansible-2.2.4 app/lib/actions/foreman_ansible/helpers/host_common.rb
foreman_ansible-2.2.3 app/lib/actions/foreman_ansible/helpers/host_common.rb
foreman_ansible-2.2.2 app/lib/actions/foreman_ansible/helpers/host_common.rb
foreman_ansible-2.2.1 app/lib/actions/foreman_ansible/helpers/host_common.rb
foreman_ansible-2.2.0 app/lib/actions/foreman_ansible/helpers/host_common.rb
foreman_ansible-2.1.2 app/lib/actions/foreman_ansible/helpers/host_common.rb
foreman_ansible-2.1.1 app/lib/actions/foreman_ansible/helpers/host_common.rb
foreman_ansible-2.0.4 app/lib/actions/foreman_ansible/helpers/host_common.rb
foreman_ansible-2.0.3 app/lib/actions/foreman_ansible/helpers/host_common.rb
foreman_ansible-2.0.2 app/lib/actions/foreman_ansible/helpers/host_common.rb