Module: Actions::ForemanAnsible::Helpers::PlayRolesDescription

Defined in:
app/lib/actions/foreman_ansible/helpers/play_roles_description.rb

Overview

Returns the name of the proxy running the specified action, or Foreman if it’s the one running the action instead.

Instance Method Summary collapse

Instance Method Details

#running_proxy_nameObject



9
10
11
12
13
14
15
16
17
# File 'app/lib/actions/foreman_ansible/helpers/play_roles_description.rb', line 9

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