Sha256: c6248b4bc3decdb7abd5e30f78f979a874ffceaf06c7c55d5b70306e0b89de05
Contents?: true
Size: 534 Bytes
Versions: 53
Compression:
Stored size: 534 Bytes
Contents
# frozen_string_literal: true module ForemanAnsible # Helper methods to create a ProxyAPI object for Ansible module ProxyAPI extend ActiveSupport::Concern included do attr_reader :ansible_proxy def find_proxy_api(ansible_proxy) if ansible_proxy.blank? raise ::Foreman::Exception.new(N_('Proxy not found')) end ::ProxyAPI::Ansible.new(:url => ansible_proxy.url) end def proxy_api @proxy_api ||= find_proxy_api(ansible_proxy) end end end end
Version data entries
53 entries across 53 versions & 1 rubygems