Sha256: 3eb01cfbc9f5965846d85a5e092687d772606980cecfbee40c18cb9e7d785690
Contents?: true
Size: 624 Bytes
Versions: 37
Compression:
Stored size: 624 Bytes
Contents
module ProxyAPI # ProxyAPI for Ansible class Ansible < ::ProxyAPI::Resource def initialize(args) @url = args[:url] + '/ansible/' super args end PROXY_ERRORS = [ Errno::ECONNREFUSED, SocketError, Timeout::Error, Errno::EINVAL, Errno::ECONNRESET, EOFError, Net::HTTPBadResponse, Net::HTTPHeaderSyntaxError, Net::ProtocolError, RestClient::ResourceNotFound ].freeze def roles parse(get('roles')) rescue *PROXY_ERRORS => e raise ProxyException.new(url, e, N_('Unable to get roles from Ansible')) end end end
Version data entries
37 entries across 37 versions & 1 rubygems