Tidy up validations + bug fixes + deprecations (#1830)

* fixed validation-modules for plugins/modules/database/misc/elasticsearch_plugin.py

* fixed validation-modules for plugins/modules/database/misc/kibana_plugin.py

* fixed validation-modules for plugins/modules/database/misc/riak.py

* fixed validation-modules for plugins/modules/database/vertica/vertica_info.py

* fixed validation-modules for plugins/modules/database/vertica/vertica_role.py

* fixed validation-modules for plugins/modules/database/vertica/vertica_schema.py

* fixed validation-modules for plugins/modules/database/vertica/vertica_user.py

* fixed validation-modules for plugins/modules/storage/ibm/ibm_sa_domain.py

* fixed validation-modules for plugins/modules/storage/ibm/ibm_sa_host_ports.py

* fixed validation-modules for plugins/modules/storage/ibm/ibm_sa_host.py

* fixed validation-modules for plugins/modules/storage/ibm/ibm_sa_pool.py

* fixed validation-modules for plugins/modules/storage/ibm/ibm_sa_vol.py

* fixed validation-modules for plugins/modules/storage/ibm/ibm_sa_vol_map.py

* fixed validation-modules for plugins/modules/storage/ibm/ibm_sa_host_ports.py

* fixed validation-modules for plugins/modules/system/runit.py

* fixed validation-modules for plugins/modules/source_control/bzr.py

* fixed validation-modules for plugins/modules/source_control/hg.py

* fixed validation-modules for plugins/modules/storage/emc/emc_vnx_sg_member.py

* fixed validation-modules for plugins/modules/identity/opendj/opendj_backendprop.py

* fixed validation-modules for plugins/modules/files/iso_extract.py

* fixed validation-modules for plugins/modules/monitoring/logstash_plugin.py

* fixed validation-modules for plugins/modules/database/aerospike/aerospike_migrations.py

* Tidy up a number of sanity checks for some modules

* added changelog fragment

* Some parameters in vertica_* had their aliases documented as the name, and sometimes vice-versa as well

* Adjustments per PR

* Rolled back sanity ignores for runit

* Update changelogs/fragments/1830-valmod_docmissingtype_batch1.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
Alexei Znamensky 2021-02-16 21:27:24 +13:00 committed by GitHub
commit 3778eac1ba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
26 changed files with 164 additions and 152 deletions

View file

@ -14,11 +14,11 @@ short_description: Updates Vertica configuration parameters.
description:
- Updates Vertica configuration parameters.
options:
name:
parameter:
description:
- Name of the parameter to update.
required: true
aliases: [parameter]
aliases: [name]
type: str
value:
description:

View file

@ -21,25 +21,30 @@ options:
description:
- Name of the cluster running the schema.
default: localhost
type: str
port:
description:
Database port to connect to.
default: 5433
type: str
db:
description:
- Name of the database running the schema.
type: str
login_user:
description:
- The username used to authenticate with.
default: dbadmin
type: str
login_password:
description:
- The password used to authenticate with.
type: str
notes:
- The default authentication assumes that you are either logging in as or sudo'ing
to the C(dbadmin) account on the host.
- This module uses C(pyodbc), a Python ODBC database adapter. You must ensure
that C(unixODBC) and C(pyodbc) is installed on the host and properly configured.
that C(unixODBC) and C(pyodbc) are installed on the host and properly configured.
- Configuring C(unixODBC) for Vertica requires C(Driver = /opt/vertica/lib64/libverticaodbc.so)
to be added to the C(Vertica) section of either C(/etc/odbcinst.ini) or C($HOME/.odbcinst.ini)
and both C(ErrorMessagesPath = /opt/vertica/lib64) and C(DriverManagerEncoding = UTF-16)

View file

@ -15,37 +15,46 @@ short_description: Adds or removes Vertica database roles and assigns roles to t
description:
- Adds or removes Vertica database role and, optionally, assign other roles.
options:
name:
role:
description:
- Name of the role to add or remove.
required: true
type: str
aliases: ['name']
assigned_roles:
description:
- Comma separated list of roles to assign to the role.
aliases: ['assigned_role']
type: str
state:
description:
- Whether to create C(present), drop C(absent) or lock C(locked) a role.
choices: ['present', 'absent']
default: present
type: str
db:
description:
- Name of the Vertica database.
type: str
cluster:
description:
- Name of the Vertica cluster.
default: localhost
type: str
port:
description:
- Vertica cluster port to connect to.
default: 5433
type: str
login_user:
description:
- The username used to authenticate with.
default: dbadmin
type: str
login_password:
description:
- The password used to authenticate with.
type: str
notes:
- The default authentication assumes that you are either logging in as or sudo'ing
to the C(dbadmin) account on the host.
@ -168,11 +177,11 @@ def main():
role=dict(required=True, aliases=['name']),
assigned_roles=dict(default=None, aliases=['assigned_role']),
state=dict(default='present', choices=['absent', 'present']),
db=dict(default=None),
db=dict(),
cluster=dict(default='localhost'),
port=dict(default='5433'),
login_user=dict(default='dbadmin'),
login_password=dict(default=None, no_log=True),
login_password=dict(no_log=True),
), supports_check_mode=True)
if not pyodbc_found:

View file

@ -20,44 +20,55 @@ description:
will fail and only remove roles created for the schema if they have
no dependencies.
options:
name:
schema:
description:
- Name of the schema to add or remove.
required: true
aliases: ['name']
type: str
usage_roles:
description:
- Comma separated list of roles to create and grant usage access to the schema.
aliases: ['usage_role']
type: str
create_roles:
description:
- Comma separated list of roles to create and grant usage and create access to the schema.
aliases: ['create_role']
type: str
owner:
description:
- Name of the user to set as owner of the schema.
type: str
state:
description:
- Whether to create C(present), or drop C(absent) a schema.
default: present
choices: ['present', 'absent']
type: str
db:
description:
- Name of the Vertica database.
type: str
cluster:
description:
- Name of the Vertica cluster.
default: localhost
type: str
port:
description:
- Vertica cluster port to connect to.
default: 5433
type: str
login_user:
description:
- The username used to authenticate with.
default: dbadmin
type: str
login_password:
description:
- The password used to authenticate with.
type: str
notes:
- The default authentication assumes that you are either logging in as or sudo'ing
to the C(dbadmin) account on the host.
@ -230,15 +241,15 @@ def main():
module = AnsibleModule(
argument_spec=dict(
schema=dict(required=True, aliases=['name']),
usage_roles=dict(default=None, aliases=['usage_role']),
create_roles=dict(default=None, aliases=['create_role']),
owner=dict(default=None),
usage_roles=dict(aliases=['usage_role']),
create_roles=dict(aliases=['create_role']),
owner=dict(),
state=dict(default='present', choices=['absent', 'present']),
db=dict(default=None),
db=dict(),
cluster=dict(default='localhost'),
port=dict(default='5433'),
login_user=dict(default='dbadmin'),
login_password=dict(default=None, no_log=True),
login_password=dict(no_log=True),
), supports_check_mode=True)
if not pyodbc_found:

View file

@ -17,22 +17,27 @@ description:
- In such a situation, if the module tries to remove the user it
will fail and only remove roles granted to the user.
options:
name:
user:
description:
- Name of the user to add or remove.
required: true
type: str
aliases: ['name']
profile:
description:
- Sets the user's profile.
type: str
resource_pool:
description:
- Sets the user's resource pool.
type: str
password:
description:
- The user's password encrypted by the MD5 algorithm.
- The password must be generated with the format C("md5" + md5[password + username]),
resulting in a total of 35 characters. An easy way to do this is by querying
the Vertica database with select 'md5'||md5('<user_password><user_name>').
type: str
expired:
description:
- Sets the user's password expiration.
@ -46,29 +51,36 @@ options:
description:
- Comma separated list of roles to assign to the user.
aliases: ['role']
type: str
state:
description:
- Whether to create C(present), drop C(absent) or lock C(locked) a user.
choices: ['present', 'absent', 'locked']
default: present
type: str
db:
description:
- Name of the Vertica database.
type: str
cluster:
description:
- Name of the Vertica cluster.
default: localhost
type: str
port:
description:
- Vertica cluster port to connect to.
default: 5433
type: str
login_user:
description:
- The username used to authenticate with.
default: dbadmin
type: str
login_password:
description:
- The password used to authenticate with.
type: str
notes:
- The default authentication assumes that you are either logging in as or sudo'ing
to the C(dbadmin) account on the host.
@ -282,18 +294,18 @@ def main():
module = AnsibleModule(
argument_spec=dict(
user=dict(required=True, aliases=['name']),
profile=dict(default=None),
resource_pool=dict(default=None),
password=dict(default=None, no_log=True),
expired=dict(type='bool', default=None),
ldap=dict(type='bool', default=None),
roles=dict(default=None, aliases=['role']),
profile=dict(),
resource_pool=dict(),
password=dict(no_log=True),
expired=dict(type='bool'),
ldap=dict(type='bool'),
roles=dict(aliases=['role']),
state=dict(default='present', choices=['absent', 'present', 'locked']),
db=dict(default=None),
db=dict(),
cluster=dict(default='localhost'),
port=dict(default='5433'),
login_user=dict(default='dbadmin'),
login_password=dict(default=None, no_log=True),
login_password=dict(no_log=True),
), supports_check_mode=True)
if not pyodbc_found: