Debian Codegraph @

ansible_collections/community/postgresql/plugins/doc_fragments/postgres.py

raw
1 # -*- coding: utf-8 -*-
2
3 # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
4
5 from __future__ import absolute_import, division, print_function
6
7 __metaclass__ = type
8
9
10 class ModuleDocFragment(object):
11 # Postgres documentation fragment
12 DOCUMENTATION = r'''
13 options:
14 login_user:
15 description:
16 - The username this module should use to establish its PostgreSQL session.
17 type: str
18 default: postgres
19 aliases: [ login ]
20 login_password:
21 description:
22 - The password this module should use to establish its PostgreSQL session.
23 type: str
24 default: ''
25 login_host:
26 description:
27 - Host running the database.
28 - If you have connection issues when using C(localhost), try to use C(127.0.0.1) instead.
29 default: ''
30 type: str
31 aliases: [ host ]
32 login_unix_socket:
33 description:
34 - Path to a Unix domain socket for local connections.
35 type: str
36 default: ''
37 aliases: [ unix_socket ]
38 login_port:
39 description:
40 - Database port to connect to.
41 - The C(port) alias is deprecated and will be removed in the next major release. Use C(login_port) instead.
42 type: int
43 default: 5432
44 aliases: [ port ]
45 ssl_mode:
46 description:
47 - Determines whether or with what priority a secure SSL TCP/IP connection will be negotiated with the server.
48 - See U(https://www.postgresql.org/docs/current/static/libpq-ssl.html) for more information on the modes.
49 - Default of C(prefer) matches libpq default.
50 type: str
51 default: prefer
52 choices: [ allow, disable, prefer, require, verify-ca, verify-full ]
53 ca_cert:
54 description:
55 - Specifies the name of a file containing SSL certificate authority (CA) certificate(s).
56 - If the file exists, the server's certificate will be verified to be signed by one of these authorities.
57 type: str
58 aliases: [ ssl_rootcert ]
59 ssl_cert:
60 description:
61 - Specifies the file name of the client SSL certificate.
62 type: path
63 version_added: '2.4.0'
64 ssl_key:
65 description:
66 - Specifies the location for the secret key used for the client certificate.
67 type: path
68 version_added: '2.4.0'
69 connect_params:
70 description:
71 - Any additional parameters to be passed to libpg.
72 - These parameters take precedence.
73 type: dict
74 default: {}
75 version_added: '2.3.0'
76
77 attributes:
78 check_mode:
79 description: Can run in check_mode and return changed status prediction without modifying target.
80
81 notes:
82 - The default authentication assumes that you are either logging in as or sudo'ing to the C(postgres) account on the host.
83 - To avoid "Peer authentication failed for user postgres" error,
84 use postgres user as a I(become_user).
85 - This module uses C(psycopg), a Python PostgreSQL database adapter. You must
86 ensure that C(psycopg2 >= 2.5.1) or C(psycopg3 >= 3.1.8) is installed on the host before using this module.
87 - If the remote host is the PostgreSQL server (which is the default case), then
88 PostgreSQL must also be installed on the remote host.
89 - For Ubuntu-based systems, install the C(postgresql), C(libpq-dev), and C(python3-psycopg2) packages
90 on the remote host before using this module.
91
92 requirements: [ 'psycopg2 >= 2.5.1' ]
93 '''