doc_fragments: Clean up parameter types (database) (#52178)

* module_utils: Clean up parameter types (database)

This PR includes:

- Parameter types added
- Copyright format fixes
- Short license statement
- Description fixes (only for a few files, then I stopped :-))

* Fix validate-modules test ignores
This commit is contained in:
Dag Wieers 2019-02-15 09:32:45 +01:00 committed by John R Barker
parent fbca8a4615
commit 27dfdb6a6a
5 changed files with 61 additions and 52 deletions

View file

@ -1,52 +1,48 @@
# This file is part of Ansible
#
# 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/>.
# -*- coding: utf-8 -*-
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
class ModuleDocFragment(object):
# Postgres documentation fragment
DOCUMENTATION = """
DOCUMENTATION = r'''
options:
login_user:
description:
- The username used to authenticate with
- The username used to authenticate with.
type: str
default: postgres
login_password:
description:
- The password used to authenticate with
- The password used to authenticate with.
type: str
login_host:
description:
- Host running the database
- Host running the database.
type: str
login_unix_socket:
description:
- Path to a Unix domain socket for local connections
- Path to a Unix domain socket for local connections.
type: path
port:
description:
- Database port to connect to.
type: int
default: 5432
ssl_mode:
description:
- Determines whether or with what priority a secure SSL TCP/IP connection will be negotiated with the server.
- See https://www.postgresql.org/docs/current/static/libpq-ssl.html for more information on the modes.
- Default of C(prefer) matches libpq default.
type: str
default: prefer
choices: [disable, allow, prefer, require, verify-ca, verify-full]
choices: [ allow, disable, prefer, require, verify-ca, verify-full ]
version_added: '2.3'
ssl_rootcert:
description:
- Specifies the name of a file containing SSL certificate authority (CA) certificate(s).
- If the file exists, the server's certificate will be verified to be signed by one of these authorities.
type: path
version_added: '2.3'
notes:
- The default authentication assumes that you are either logging in as or sudo'ing to the C(postgres) account on the host.
@ -56,4 +52,4 @@ notes:
and C(python-psycopg2) packages on the remote host before using this module.
- The ssl_rootcert parameter requires at least Postgres version 8.4 and I(psycopg2) version 2.4.3.
requirements: [ psycopg2 ]
"""
'''