Clean up module documentation (#36909)

* Clean up module documentation

This PR includes:
- Removal of `default: None` (and variations)
- Removal of `required: false`
- Fixing booleans and `type: bool` where required

* Fix remaining (new) validation issues
This commit is contained in:
Dag Wieers 2018-03-15 22:15:24 +01:00 committed by GitHub
parent 58eb2e849d
commit cdd21e2170
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
624 changed files with 1458 additions and 9114 deletions

View file

@ -24,34 +24,23 @@ options:
description:
- name of the database to add or remove
required: true
default: null
aliases: [ db ]
owner:
description:
- Name of the role to set as owner of the database
required: false
default: null
template:
description:
- Template used to create the database
required: false
default: null
encoding:
description:
- Encoding of the database
required: false
default: null
lc_collate:
description:
- Collation order (LC_COLLATE) to use in the database. Must match collation order of template database unless C(template0) is used as template.
required: false
default: null
lc_ctype:
description:
- Character classification (LC_CTYPE) to use in the database (e.g. lower, upper, ...) Must match LC_CTYPE of template database unless C(template0)
is used as template.
required: false
default: null
state:
description: |
The database state. present implies that the database should be created if necessary.
@ -61,7 +50,6 @@ options:
(Added in 2.4) The format of the backup will be detected based on the target name.
Supported compression formats for dump and restore are: .bz2, .gz, and .xz
Supported formats for dump and restore are: .sql and .tar
required: false
default: present
choices: [ "present", "absent", "dump", "restore" ]
target:

View file

@ -24,36 +24,27 @@ options:
description:
- name of the extension to add or remove
required: true
default: null
db:
description:
- name of the database to add or remove the extension to/from
required: true
default: null
login_user:
description:
- The username used to authenticate with
required: false
default: null
login_password:
description:
- The password used to authenticate with
required: false
default: null
login_host:
description:
- Host running the database
required: false
default: localhost
port:
description:
- Database port to connect to.
required: false
default: 5432
state:
description:
- The database extension state
required: false
default: present
choices: [ "present", "absent" ]
notes:

View file

@ -36,63 +36,51 @@ options:
description:
- name of the procedural language to add, remove or change
required: true
default: null
trust:
description:
- make this language trusted for the selected db
required: false
default: no
type: bool
default: 'no'
choices: [ "yes", "no" ]
db:
description:
- name of database where the language will be added, removed or changed
required: false
default: null
force_trust:
description:
- marks the language as trusted, even if it's marked as untrusted in pg_pltemplate.
- use with care!
required: false
default: no
choices: [ "yes", "no" ]
type: bool
default: 'no'
fail_on_drop:
description:
- if C(yes), fail when removing a language. Otherwise just log and continue
- in some cases, it is not possible to remove a language (used by the db-system). When dependencies block the removal, consider using C(cascade).
required: false
type: bool
default: 'yes'
choices: [ "yes", "no" ]
cascade:
description:
- when dropping a language, also delete object that depend on this language.
- only used when C(state=absent).
required: false
default: no
choices: [ "yes", "no" ]
type: bool
default: 'no'
port:
description:
- Database port to connect to.
required: false
default: 5432
login_user:
description:
- User used to authenticate with PostgreSQL
required: false
default: postgres
login_password:
description:
- Password used to authenticate with PostgreSQL (must match C(login_user))
required: false
default: null
login_host:
description:
- Host running PostgreSQL where you want to execute the actions.
required: false
default: localhost
state:
description:
- The state of the language for the selected database
required: false
default: present
choices: [ "present", "absent" ]
notes:

View file

@ -33,18 +33,15 @@ options:
description:
- If C(present), the specified privileges are granted, if C(absent) they
are revoked.
required: no
default: present
choices: [present, absent]
privs:
description:
- Comma separated list of privileges to grant/revoke.
- 'Alias: I(priv)'
required: no
type:
description:
- Type of database object to set privileges on.
required: no
default: table
choices: [table, sequence, function, database,
schema, language, tablespace, group]
@ -61,13 +58,11 @@ options:
replaced with commas (needed to specify function signatures, see
examples)'
- 'Alias: I(obj)'
required: no
schema:
description:
- Schema that contains the database objects specified via I(objs).
- May only be provided if I(type) is C(table), C(sequence) or
C(function). Defaults to C(public) in these cases.
required: no
roles:
description:
- Comma separated list of role (user/group) names to set permissions for.
@ -83,25 +78,19 @@ options:
make no changes.
- I(grant_option) only has an effect if I(state) is C(present).
- 'Alias: I(admin_option)'
required: no
choices: ['yes', 'no']
type: bool
host:
description:
- Database host address. If unspecified, connect via Unix socket.
- 'Alias: I(login_host)'
default: null
required: no
port:
description:
- Database port to connect to.
required: no
default: 5432
unix_socket:
description:
- Path to a Unix domain socket for local connections.
- 'Alias: I(login_unix_socket)'
required: false
default: null
login:
description:
- The username to authenticate with.
@ -111,14 +100,11 @@ options:
description:
- The password to authenticate with.
- 'Alias: I(login_password))'
default: null
required: no
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.
required: false
default: prefer
choices: [disable, allow, prefer, require, verify-ca, verify-full]
version_added: '2.3'
@ -126,8 +112,6 @@ options:
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.
required: false
default: null
version_added: '2.3'
notes:
- Default authentication assumes that postgresql_privs is run by the

View file

@ -24,46 +24,33 @@ options:
description:
- Name of the schema to add or remove.
required: true
default: null
database:
description:
- Name of the database to connect to.
required: false
default: postgres
login_user:
description:
- The username used to authenticate with.
required: false
default: null
login_password:
description:
- The password used to authenticate with.
required: false
default: null
login_host:
description:
- Host running the database.
required: false
default: localhost
login_unix_socket:
description:
- Path to a Unix domain socket for local connections.
required: false
default: null
owner:
description:
- Name of the role to set as owner of the schema.
required: false
default: null
port:
description:
- Database port to connect to.
required: false
default: 5432
state:
description:
- The schema state.
required: false
default: present
choices: [ "present", "absent" ]
notes:

View file

@ -36,7 +36,6 @@ options:
description:
- name of the user (role) to add or remove
required: true
default: null
password:
description:
- set the user's password, before 1.4 this was required.
@ -45,16 +44,14 @@ options:
C('str[\\"md5\\"] + md5[ password + username ]'), resulting in a total of 35 characters. An easy way to do this is:
C(echo \\"md5`echo -n \\"verysecretpasswordJOE\\" | md5`\\"). Note that if the provided password string is already in
MD5-hashed format, then it is used as-is, regardless of encrypted parameter.
default: null
db:
description:
- name of database where permissions will be granted
default: null
fail_on_user:
description:
- if C(yes), fail when user can't be removed. Otherwise just log and continue
type: bool
default: 'yes'
choices: [ yes, no ]
port:
description:
- Database port to connect to.
@ -66,7 +63,6 @@ options:
login_password:
description:
- Password used to authenticate with PostgreSQL
default: null
login_host:
description:
- Host running PostgreSQL.
@ -74,11 +70,9 @@ options:
login_unix_socket:
description:
- Path to a Unix domain socket for local connections
default: null
priv:
description:
- "PostgreSQL privileges string in the format: C(table:priv1,priv2)"
default: null
role_attr_flags:
description:
- "PostgreSQL role attributes string in the format: CREATEDB,CREATEROLE,SUPERUSER"
@ -94,21 +88,19 @@ options:
description:
- whether the password is stored hashed in the database. boolean. Passwords can be passed already hashed or unhashed, and postgresql ensures the
stored password is hashed when encrypted is set.
default: false
version_added: '1.4'
expires:
description:
- The date at which the user's password is to expire.
- If set to C('infinity'), user's password never expire.
- Note that this value should be a valid SQL date and time type.
default: null
version_added: '1.4'
no_password_changes:
description:
- if C(yes), don't inspect database for password changes. Effective when C(pg_authid) is not accessible (such as AWS RDS). Otherwise, make
password changes as necessary.
type: bool
default: 'no'
choices: [ yes, no ]
version_added: '2.0'
ssl_mode:
description:
@ -122,12 +114,10 @@ options:
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.
default: null
version_added: '2.3'
conn_limit:
description:
- Specifies the user connection limit.
default: null
version_added: '2.4'
notes:
- The default authentication assumes that you are either logging in as or