Debian Codegraph @

lib/ansible/plugins/doc_fragments/url.py

raw
1 # -*- coding: utf-8 -*-
2
3 # Copyright: (c) 2018, John Barker <[email protected]>
4 # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
5 from __future__ import annotations
6
7
8 class ModuleDocFragment(object):
9
10 # Standard files documentation fragment
11 DOCUMENTATION = r"""
12 options:
13 url:
14 description:
15 - HTTP, HTTPS, or FTP URL in the form (http|https|ftp)://[user[:pass]]@host.domain[:port]/path
16 type: str
17 force:
18 description:
19 - If V(yes) do not get a cached copy.
20 type: bool
21 default: no
22 http_agent:
23 description:
24 - Header to identify as, generally appears in web server logs.
25 type: str
26 default: ansible-httpget
27 use_proxy:
28 description:
29 - If V(no), it will not use a proxy, even if one is defined in an environment variable on the target hosts.
30 type: bool
31 default: yes
32 validate_certs:
33 description:
34 - If V(no), SSL certificates will not be validated.
35 - This should only be used on personally controlled sites using self-signed certificates.
36 type: bool
37 default: yes
38 url_username:
39 description:
40 - The username for use in HTTP basic authentication.
41 - This parameter can be used without O(url_password) for sites that allow empty passwords.
42 type: str
43 url_password:
44 description:
45 - The password for use in HTTP basic authentication.
46 - If the O(url_username) parameter is not specified, the O(url_password) parameter will not be used.
47 type: str
48 force_basic_auth:
49 description:
50 - Credentials specified with O(url_username) and O(url_password) should be passed in HTTP Header.
51 type: bool
52 default: no
53 client_cert:
54 description:
55 - PEM formatted certificate chain file to be used for SSL client authentication.
56 - This file can also include the key as well, and if the key is included, O(client_key) is not required.
57 type: path
58 client_key:
59 description:
60 - PEM formatted file that contains your private key to be used for SSL client authentication.
61 - If O(client_cert) contains both the certificate and key, this option is not required.
62 type: path
63 use_gssapi:
64 description:
65 - Use GSSAPI to perform the authentication, typically this is for Kerberos or Kerberos through Negotiate
66 authentication.
67 - Requires the Python library L(gssapi,https://github.com/pythongssapi/python-gssapi) to be installed.
68 - Credentials for GSSAPI can be specified with O(url_username)/O(url_password) or with the GSSAPI env var
69 E(KRB5CCNAME) that specified a custom Kerberos credential cache.
70 - NTLM authentication is B(not) supported even if the GSSAPI mech for NTLM has been installed.
71 type: bool
72 default: no
73 version_added: '2.11'
74 """
75
76 URL_REDIRECT = r'''
77 options:
78 follow_redirects:
79 description:
80 - Whether or not the URI module should follow redirects.
81 type: str
82 default: safe
83 choices:
84 all: Will follow all redirects.
85 none: Will not follow any redirects.
86 safe: Only redirects doing GET or HEAD requests will be followed.
87 urllib2: Defer to urllib2 behavior (As of writing this follows HTTP redirects).
88 '''