From 5937080977ae50823ee68ed5d87a6c4ad2433e29 Mon Sep 17 00:00:00 2001 From: Andrey Klychkov Date: Fri, 28 Jun 2019 16:44:32 +0300 Subject: [PATCH] postgresql modules: remove extra lines from doc that are presented in ext doc fragment (#58501) --- .../database/postgresql/postgresql_info.py | 13 ------------- .../database/postgresql/postgresql_lang.py | 11 ----------- .../database/postgresql/postgresql_membership.py | 12 ------------ .../database/postgresql/postgresql_owner.py | 15 --------------- .../database/postgresql/postgresql_ping.py | 12 +----------- .../database/postgresql/postgresql_privs.py | 10 ---------- .../database/postgresql/postgresql_query.py | 12 ------------ .../database/postgresql/postgresql_schema.py | 8 -------- .../modules/database/postgresql/postgresql_set.py | 9 --------- .../database/postgresql/postgresql_slot.py | 14 +------------- .../database/postgresql/postgresql_table.py | 11 ----------- .../database/postgresql/postgresql_user.py | 13 ------------- 12 files changed, 2 insertions(+), 138 deletions(-) diff --git a/lib/ansible/modules/database/postgresql/postgresql_info.py b/lib/ansible/modules/database/postgresql/postgresql_info.py index 567328c64d4..39f3d8a7563 100644 --- a/lib/ansible/modules/database/postgresql/postgresql_info.py +++ b/lib/ansible/modules/database/postgresql/postgresql_info.py @@ -46,19 +46,6 @@ options: - Permissions checking for SQL commands is carried out as though the session_role were the one that had logged in originally. type: str -notes: -- The default authentication assumes that you are either logging in as or - sudo'ing to the postgres account on the host. -- login_user or session_role must be able to read from pg_authid. -- To avoid "Peer authentication failed for user postgres" error, - use postgres user as a I(become_user). -- This module uses psycopg2, a Python PostgreSQL database adapter. You must - ensure that psycopg2 is installed on the host before using this module. If - the remote host is the PostgreSQL server (which is the default case), then - PostgreSQL must also be installed on the remote host. For Ubuntu-based - systems, install the postgresql, libpq-dev, and python-psycopg2 packages - on the remote host before using this module. -requirements: [ psycopg2 ] author: - Andrew Klychkov (@Andersson007) extends_documentation_fragment: postgres diff --git a/lib/ansible/modules/database/postgresql/postgresql_lang.py b/lib/ansible/modules/database/postgresql/postgresql_lang.py index c601d094aa6..7b978283655 100644 --- a/lib/ansible/modules/database/postgresql/postgresql_lang.py +++ b/lib/ansible/modules/database/postgresql/postgresql_lang.py @@ -107,17 +107,6 @@ options: type: str aliases: [ ssl_rootcert ] version_added: '2.8' -notes: -- The default authentication assumes that you are either logging in as or - sudo'ing to the postgres account on the host. -- This module uses psycopg2, a Python PostgreSQL database adapter. You must - ensure that psycopg2 is installed on the host before using this module. -- If the remote host is the PostgreSQL server (which is the default case), then - PostgreSQL must also be installed on the remote host. -- For Ubuntu-based systems, install the postgresql, libpq-dev, and python-psycopg2 packages - on the remote host before using this module. -requirements: [ psycopg2 ] - author: - Jens Depuydt (@jensdepuydt) - Thomas O'Donnell (@andytom) diff --git a/lib/ansible/modules/database/postgresql/postgresql_membership.py b/lib/ansible/modules/database/postgresql/postgresql_membership.py index 4a194762584..61a2049ed4a 100644 --- a/lib/ansible/modules/database/postgresql/postgresql_membership.py +++ b/lib/ansible/modules/database/postgresql/postgresql_membership.py @@ -74,18 +74,6 @@ options: - Permissions checking for SQL commands is carried out as though the session_role were the one that had logged in originally. type: str -notes: -- The default authentication assumes that you are either logging in as or - sudo'ing to the postgres account on the host. -- To avoid "Peer authentication failed for user postgres" error, - use postgres user as a I(become_user). -- This module uses psycopg2, a Python PostgreSQL database adapter. You must - ensure that psycopg2 is installed on the host before using this module. -- If the remote host is the PostgreSQL server (which is the default case), then - PostgreSQL must also be installed on the remote host. -- For Ubuntu-based systems, install the postgresql, libpq-dev, and python-psycopg2 packages - on the remote host before using this module. -requirements: [ psycopg2 ] author: - Andrew Klychkov (@Andersson007) extends_documentation_fragment: postgres diff --git a/lib/ansible/modules/database/postgresql/postgresql_owner.py b/lib/ansible/modules/database/postgresql/postgresql_owner.py index d0e0cc92645..2c7e7f05479 100644 --- a/lib/ansible/modules/database/postgresql/postgresql_owner.py +++ b/lib/ansible/modules/database/postgresql/postgresql_owner.py @@ -74,21 +74,6 @@ options: - Permissions checking for SQL commands is carried out as though the session_role were the one that had logged in originally. type: str -notes: -- The default authentication assumes that you are either logging in as or - sudo'ing to the postgres account on the host. -- To avoid "Peer authentication failed for user postgres" error, - use postgres user as a I(become_user). -- This module uses psycopg2, a Python PostgreSQL database adapter. You must - ensure that psycopg2 is installed on the host before using this module. -- If the remote host is the PostgreSQL server (which is the default case), then - PostgreSQL must also be installed on the remote host. -- For Ubuntu-based systems, install the postgresql, libpq-dev, and python-psycopg2 packages - on the remote host before using this module. - -requirements: -- psycopg2 - author: - Andrew Klychkov (@Andersson007) extends_documentation_fragment: postgres diff --git a/lib/ansible/modules/database/postgresql/postgresql_ping.py b/lib/ansible/modules/database/postgresql/postgresql_ping.py index f72174cad8c..53da87e123e 100644 --- a/lib/ansible/modules/database/postgresql/postgresql_ping.py +++ b/lib/ansible/modules/database/postgresql/postgresql_ping.py @@ -23,20 +23,10 @@ version_added: '2.8' options: db: description: - - Name of database to connect. + - Name of a database to connect to. type: str aliases: - login_db -notes: -- The default authentication assumes that you are either logging in as or - sudo'ing to the postgres account on the host. -- This module uses psycopg2, a Python PostgreSQL database adapter. You must - ensure that psycopg2 is installed on the host before using this module. If - the remote host is the PostgreSQL server (which is the default case), then - PostgreSQL must also be installed on the remote host. For Ubuntu-based - systems, install the postgresql, libpq-dev, and python-psycopg2 packages - on the remote host before using this module. -requirements: [ psycopg2 ] author: - Andrew Klychkov (@Andersson007) extends_documentation_fragment: postgres diff --git a/lib/ansible/modules/database/postgresql/postgresql_privs.py b/lib/ansible/modules/database/postgresql/postgresql_privs.py index 4d50f9844d6..9d5304a7e98 100644 --- a/lib/ansible/modules/database/postgresql/postgresql_privs.py +++ b/lib/ansible/modules/database/postgresql/postgresql_privs.py @@ -161,12 +161,6 @@ options: - ssl_rootcert notes: -- Default authentication assumes that postgresql_privs is run by the - C(postgres) user on the remote host. (Ansible's C(user) or C(sudo-user)). -- This module requires Python package I(psycopg2) to be installed on the - remote host. In the default case of the remote host also being the - PostgreSQL server, PostgreSQL has to be installed there as well, obviously. - For Debian/Ubuntu-based systems, install packages I(postgresql) and I(python-psycopg2). - Parameters that accept comma separated lists (I(privs), I(objs), I(roles)) have singular alias names (I(priv), I(obj), I(role)). - To revoke only C(GRANT OPTION) for a specific object, set I(state) to @@ -177,10 +171,6 @@ notes: specified via I(login). If R has been granted the same privileges by another user also, R can still access database objects via these privileges. - When revoking privileges, C(RESTRICT) is assumed (see PostgreSQL docs). -- The ca_cert parameter requires at least Postgres version 8.4 and I(psycopg2) version 2.4.3. - -requirements: -- psycopg2 extends_documentation_fragment: - postgres diff --git a/lib/ansible/modules/database/postgresql/postgresql_query.py b/lib/ansible/modules/database/postgresql/postgresql_query.py index 21f80543710..0957bda98d9 100644 --- a/lib/ansible/modules/database/postgresql/postgresql_query.py +++ b/lib/ansible/modules/database/postgresql/postgresql_query.py @@ -56,18 +56,6 @@ options: type: str aliases: - login_db -notes: -- The default authentication assumes that you are either logging in as or - sudo'ing to the postgres account on the host. -- To avoid "Peer authentication failed for user postgres" error, - use postgres user as a I(become_user). -- This module uses psycopg2, a Python PostgreSQL database adapter. You must - ensure that psycopg2 is installed on the host before using this module. If - the remote host is the PostgreSQL server (which is the default case), then - PostgreSQL must also be installed on the remote host. For Ubuntu-based - systems, install the postgresql, libpq-dev, and python-psycopg2 packages - on the remote host before using this module. -requirements: [ psycopg2 ] author: - Felix Archambault (@archf) - Andrew Klychkov (@Andersson007) diff --git a/lib/ansible/modules/database/postgresql/postgresql_schema.py b/lib/ansible/modules/database/postgresql/postgresql_schema.py index 44ae53a7079..87ece3a3fb4 100644 --- a/lib/ansible/modules/database/postgresql/postgresql_schema.py +++ b/lib/ansible/modules/database/postgresql/postgresql_schema.py @@ -74,14 +74,6 @@ options: type: str aliases: [ ssl_rootcert ] version_added: '2.8' -notes: -- This module uses I(psycopg2), a Python PostgreSQL database adapter. -- You must ensure that psycopg2 is installed on the host before using this module. -- If the remote host is the PostgreSQL server (which is the default case), - then PostgreSQL must also be installed on the remote host. -- For Ubuntu-based systems, install the C(postgresql), C(libpq-dev), - and C(python-psycopg2) packages on the remote host before using this module. -requirements: [ psycopg2 ] author: - Flavien Chantelot (@Dorn-) - Thomas O'Donnell (@andytom) diff --git a/lib/ansible/modules/database/postgresql/postgresql_set.py b/lib/ansible/modules/database/postgresql/postgresql_set.py index 0b7259a0f34..30eb4548ecc 100644 --- a/lib/ansible/modules/database/postgresql/postgresql_set.py +++ b/lib/ansible/modules/database/postgresql/postgresql_set.py @@ -72,15 +72,6 @@ notes: not restarted and the value in pg_settings is not updated yet. - For some parameters restart of PostgreSQL server is required. See official documentation U(https://www.postgresql.org/docs/current/view-pg-settings.html). -- The default authentication assumes that you are either logging in as or - sudo'ing to the postgres account on the host. -- This module uses psycopg2, a Python PostgreSQL database adapter. You must - ensure that psycopg2 is installed on the host before using this module. If - the remote host is the PostgreSQL server (which is the default case), then - PostgreSQL must also be installed on the remote host. For Ubuntu-based - systems, install the postgresql, libpq-dev, and python-psycopg2 packages - on the remote host before using this module. -requirements: [ psycopg2 ] author: - Andrew Klychkov (@Andersson007) extends_documentation_fragment: postgres diff --git a/lib/ansible/modules/database/postgresql/postgresql_slot.py b/lib/ansible/modules/database/postgresql/postgresql_slot.py index 61ed8bfc84a..f122734f49a 100644 --- a/lib/ansible/modules/database/postgresql/postgresql_slot.py +++ b/lib/ansible/modules/database/postgresql/postgresql_slot.py @@ -78,22 +78,10 @@ options: notes: - Physical replication slots were introduced to PostgreSQL with version 9.4, while logical replication slots were added beginning with version 10.0. -- The default authentication assumes that you are either logging in as or - sudo'ing to the postgres account on the host. -- To avoid "Peer authentication failed for user postgres" error, - use postgres user as a I(become_user). -- This module uses psycopg2, a Python PostgreSQL database adapter. You must - ensure that psycopg2 is installed on the host before using this module. -- If the remote host is the PostgreSQL server (which is the default case), then - PostgreSQL must also be installed on the remote host. -- For Ubuntu-based systems, install the postgresql, libpq-dev, and python-psycopg2 packages - -requirements: -- psycopg2 author: - John Scalia (@jscalia) -- Andew Klychkov (@Andersson007) +- Andrew Klychkov (@Andersson007) extends_documentation_fragment: postgres ''' diff --git a/lib/ansible/modules/database/postgresql/postgresql_table.py b/lib/ansible/modules/database/postgresql/postgresql_table.py index 94c9f85360d..63d66914098 100644 --- a/lib/ansible/modules/database/postgresql/postgresql_table.py +++ b/lib/ansible/modules/database/postgresql/postgresql_table.py @@ -105,19 +105,8 @@ notes: - If you do not pass db parameter, tables will be created in the database named postgres. - PostgreSQL allows to create columnless table, so columns param is optional. -- The default authentication assumes that you are either logging in as or - sudo'ing to the postgres account on the host. -- To avoid "Peer authentication failed for user postgres" error, - use postgres user as a I(become_user). - Unlogged tables are available from PostgreSQL server version 9.1 U(https://www.postgresql.org/docs/9.1/sql-createtable.html). -- This module uses psycopg2, a Python PostgreSQL database adapter. You must - ensure that psycopg2 is installed on the host before using this module. -- If the remote host is the PostgreSQL server (which is the default case), then - PostgreSQL must also be installed on the remote host. For Ubuntu-based - systems, install the postgresql, libpq-dev, and python-psycopg2 packages - on the remote host before using this module. -requirements: [ psycopg2 ] author: - Andrew Klychkov (@Andersson007) extends_documentation_fragment: postgres diff --git a/lib/ansible/modules/database/postgresql/postgresql_user.py b/lib/ansible/modules/database/postgresql/postgresql_user.py index b328d072ff2..95f97ee4b82 100644 --- a/lib/ansible/modules/database/postgresql/postgresql_user.py +++ b/lib/ansible/modules/database/postgresql/postgresql_user.py @@ -150,21 +150,8 @@ options: notes: - The module creates a user (role) with login privilege by default. Use NOLOGIN role_attr_flags to change this behaviour. -- The default authentication assumes that you are either logging in as or - sudo'ing to the postgres account on the host. -- This module uses psycopg2, a Python PostgreSQL database adapter. You must - ensure that psycopg2 is installed on the host before using this module. If - the remote host is the PostgreSQL server (which is the default case), then - PostgreSQL must also be installed on the remote host. For Ubuntu-based - systems, install the postgresql, libpq-dev, and python-psycopg2 packages - on the remote host before using this module. - If you specify PUBLIC as the user (role), then the privilege changes will apply to all users (roles). You may not specify password or role_attr_flags when the PUBLIC user is specified. -- The ca_cert parameter requires at least Postgres version 8.4 and I(psycopg2) version 2.4.3. - -requirements: -- psycopg2 - author: - Ansible Core Team extends_documentation_fragment: postgres