@ -5,7 +5,7 @@ from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = """
lookup : url
name : url
author : Brian Coca ( @bcoca )
version_added : " 1.9 "
short_description : return contents from URL
@ -50,7 +50,7 @@ options:
- name : ANSIBLE_LOOKUP_URL_FORCE
ini :
- section : url_lookup
- key : force
key : force
timeout :
description : How long to wait for the server to send data before giving up
type : float
@ -62,7 +62,7 @@ options:
- name : ANSIBLE_LOOKUP_URL_TIMEOUT
ini :
- section : url_lookup
- key : timeout
key : timeout
http_agent :
description : User - Agent to use in the request
type : string
@ -73,7 +73,7 @@ options:
- name : ANSIBLE_LOOKUP_URL_AGENT
ini :
- section : url_lookup
- key : agent
key : agent
force_basic_auth :
description : Force basic authentication
type : boolean
@ -85,7 +85,7 @@ options:
- name : ANSIBLE_LOOKUP_URL_AGENT
ini :
- section : url_lookup
- key : agent
key : agent
follow_redirects :
description : String of urllib2 , all / yes , safe , none to determine how redirects are followed , see RedirectHandlerFactory for more information
type : string
@ -97,7 +97,7 @@ options:
- name : ANSIBLE_LOOKUP_URL_FOLLOW_REDIRECTS
ini :
- section : url_lookup
- key : follow_redirects
key : follow_redirects
use_gssapi :
description : Use GSSAPI handler of requests
type : boolean
@ -109,7 +109,7 @@ options:
- name : ANSIBLE_LOOKUP_URL_USE_GSSAPI
ini :
- section : url_lookup
- key : use_gssapi
key : use_gssapi
unix_socket :
description : String of file system path to unix socket file to use when establishing connection to the provided url
type : string
@ -120,7 +120,7 @@ options:
- name : ANSIBLE_LOOKUP_URL_UNIX_SOCKET
ini :
- section : url_lookup
- key : unix_socket
key : unix_socket
ca_path :
description : String of file system path to CA cert bundle to use
type : string
@ -131,7 +131,7 @@ options:
- name : ANSIBLE_LOOKUP_URL_CA_PATH
ini :
- section : url_lookup
- key : ca_path
key : ca_path
unredirected_headers :
description : A list of headers to not attach on a redirected request
type : list
@ -142,7 +142,7 @@ options:
- name : ANSIBLE_LOOKUP_URL_UNREDIR_HEADERS
ini :
- section : url_lookup
- key : unredirected_headers
key : unredirected_headers
"""
EXAMPLES = """
@ -166,6 +166,8 @@ EXAMPLES = """
RETURN = """
_list :
description : list of list of lines or content of url ( s )
type : list
elements : str
"""
from ansible . errors import AnsibleError