Add types to common url parameters (#50000)

pull/4420/head
Dag Wieers 2018-12-17 18:26:07 +01:00 committed by Alicia Cozine
parent 00a83035f2
commit d4ee599fe9
1 changed files with 20 additions and 28 deletions

View File

@ -1,29 +1,18 @@
# (c) 2018, John Barker<gundalow@redhat.com> # -*- coding: utf-8 -*-
#
# This file is part of Ansible # Copyright: (c) 2018, John Barker <gundalow@redhat.com>
# # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
class ModuleDocFragment(object): class ModuleDocFragment(object):
# Standard files documentation fragment # Standard files documentation fragment
DOCUMENTATION = """ DOCUMENTATION = r'''
options: options:
url: url:
description: description:
- HTTP, HTTPS, or FTP URL in the form (http|https|ftp)://[user[:pass]]@host.domain[:port]/path - HTTP, HTTPS, or FTP URL in the form (http|https|ftp)://[user[:pass]]@host.domain[:port]/path
type: str
force: force:
description: description:
- If C(yes) do not get a cached copy. - If C(yes) do not get a cached copy.
@ -34,6 +23,7 @@ options:
http_agent: http_agent:
description: description:
- Header to identify as, generally appears in web server logs. - Header to identify as, generally appears in web server logs.
type: str
default: ansible-httpget default: ansible-httpget
use_proxy: use_proxy:
description: description:
@ -42,31 +32,33 @@ options:
default: yes default: yes
validate_certs: validate_certs:
description: description:
- If C(no), SSL certificates will not be validated. This should only be used - If C(no), SSL certificates will not be validated.
on personally controlled sites using self-signed certificates. - This should only be used on personally controlled sites using self-signed certificates.
default: yes
type: bool type: bool
default: yes
url_username: url_username:
description: description:
- The username for use in HTTP basic authentication. - The username for use in HTTP basic authentication.
- This parameter can be used without I(url_password) for sites that allow empty passwords - This parameter can be used without I(url_password) for sites that allow empty passwords
type: str
url_password: url_password:
description: description:
- The password for use in HTTP basic authentication. - The password for use in HTTP basic authentication.
- If the I(url_username) parameter is not specified, the I(url_password) parameter will not be used. - If the I(url_username) parameter is not specified, the I(url_password) parameter will not be used.
type: str
force_basic_auth: force_basic_auth:
description: description:
- Credentials specified with I(url_username) and I(url_password) should be passed in HTTP Header. - Credentials specified with I(url_username) and I(url_password) should be passed in HTTP Header.
default: no
type: bool type: bool
default: no
client_cert: client_cert:
description: description:
- PEM formatted certificate chain file to be used for SSL client - PEM formatted certificate chain file to be used for SSL client authentication.
authentication. This file can also include the key as well, and if - This file can also include the key as well, and if the key is included, C(client_key) is not required.
the key is included, C(client_key) is not required. type: str
client_key: client_key:
description: description:
- PEM formatted file that contains your private key to be used for SSL - PEM formatted file that contains your private key to be used for SSL client authentication.
client authentication. If C(client_cert) contains both the certificate - If C(client_cert) contains both the certificate and key, this option is not required.
and key, this option is not required. type: str
""" '''