Sha256: 57b0f556ba2b606ab6ea55a97526cfe45f9929442edb8468ab60775b25c2df75

Contents?: true

Size: 535 Bytes

Versions: 32

Compression:

Stored size: 535 Bytes

Contents

module Actions
  module ForemanAnsible
    module Helpers
      # Returns the name of the proxy running the specified action, or Foreman
      # if it's the one running the action instead.
      module PlayRolesDescription
        def running_proxy_name
          proxy = input.fetch(:host, {})[:proxy_used]
          proxy ||= input.fetch(:hostgroup, {})[:proxy_used]
          if [:not_defined, 'Foreman'].include? proxy
            _('Foreman')
          else
            proxy
          end
        end
      end
    end
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
foreman_ansible-1.5.2 app/lib/actions/foreman_ansible/helpers/play_roles_description.rb
foreman_ansible-1.5.1 app/lib/actions/foreman_ansible/helpers/play_roles_description.rb
foreman_ansible-1.5.0 app/lib/actions/foreman_ansible/helpers/play_roles_description.rb
foreman_ansible-2.1.0 app/lib/actions/foreman_ansible/helpers/play_roles_description.rb
foreman_ansible-2.0.1 app/lib/actions/foreman_ansible/helpers/play_roles_description.rb
foreman_ansible-2.0.0 app/lib/actions/foreman_ansible/helpers/play_roles_description.rb
foreman_ansible-1.4.6 app/lib/actions/foreman_ansible/helpers/play_roles_description.rb
foreman_ansible-1.4.5 app/lib/actions/foreman_ansible/helpers/play_roles_description.rb
foreman_ansible-1.4.3 app/lib/actions/foreman_ansible/helpers/play_roles_description.rb
foreman_ansible-1.4.2 app/lib/actions/foreman_ansible/helpers/play_roles_description.rb
foreman_ansible-1.4.1 app/lib/actions/foreman_ansible/helpers/play_roles_description.rb
foreman_ansible-1.4.0 app/lib/actions/foreman_ansible/helpers/play_roles_description.rb