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

* 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>
(cherry picked from commit 3778eac1ba)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
patchback[bot] 2021-02-16 09:10:13 +00:00 committed by GitHub
commit 0d0884b069
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
26 changed files with 164 additions and 152 deletions

View file

@ -115,7 +115,6 @@ EXAMPLES = '''
local_only: False
# example playbook:
---
- name: Upgrade aerospike
hosts: all
become: true

View file

@ -22,11 +22,13 @@ options:
description:
- Name of the plugin to install.
required: True
type: str
state:
description:
- Desired state of a plugin.
choices: ["present", "absent"]
default: present
type: str
src:
description:
- Optionally set the source location to retrieve the plugin from. This can be a file://
@ -38,16 +40,19 @@ options:
effect.
- For ES 1.x use url.
required: False
type: str
url:
description:
- Set exact URL to download the plugin from (Only works for ES 1.x).
- For ES 2.x and higher, use src.
required: False
type: str
timeout:
description:
- "Timeout setting: 30s, 1m, 1h..."
- Only valid for Elasticsearch < 5.0. This option is ignored for Elasticsearch > 5.0.
default: 1m
type: str
force:
description:
- "Force batch mode when installing plugins. This is only necessary if a plugin requires additional permissions and console detection fails."
@ -57,20 +62,25 @@ options:
description:
- Location of the plugin binary. If this file is not found, the default plugin binaries will be used.
- The default changed in Ansible 2.4 to None.
type: path
plugin_dir:
description:
- Your configured plugin directory specified in Elasticsearch
default: /usr/share/elasticsearch/plugins/
type: path
proxy_host:
description:
- Proxy host to use during plugin installation
type: str
proxy_port:
description:
- Proxy port to use during plugin installation
type: str
version:
description:
- Version of the plugin to be installed.
If plugin exists with previous version, it will NOT be updated
type: str
'''
EXAMPLES = '''
@ -241,7 +251,7 @@ def main():
module = AnsibleModule(
argument_spec=dict(
name=dict(required=True),
state=dict(default="present", choices=PACKAGE_STATE_MAP.keys()),
state=dict(default="present", choices=list(PACKAGE_STATE_MAP.keys())),
src=dict(default=None),
url=dict(default=None),
timeout=dict(default="1m"),

View file

@ -22,31 +22,38 @@ options:
description:
- Name of the plugin to install.
required: True
type: str
state:
description:
- Desired state of a plugin.
choices: ["present", "absent"]
default: present
type: str
url:
description:
- Set exact URL to download the plugin from.
- For local file, prefix its absolute path with file://
type: str
timeout:
description:
- "Timeout setting: 30s, 1m, 1h etc."
default: 1m
type: str
plugin_bin:
description:
- Location of the Kibana binary.
default: /opt/kibana/bin/kibana
type: path
plugin_dir:
description:
- Your configured plugin directory specified in Kibana.
default: /opt/kibana/installedPlugins/
type: path
version:
description:
- Version of the plugin to be installed.
- If plugin exists with previous version, plugin will NOT be updated unless C(force) is set to yes.
type: str
force:
description:
- Delete and re-install the plugin. Can be useful for plugins update.
@ -209,7 +216,7 @@ def main():
module = AnsibleModule(
argument_spec=dict(
name=dict(required=True),
state=dict(default="present", choices=PACKAGE_STATE_MAP.keys()),
state=dict(default="present", choices=list(PACKAGE_STATE_MAP.keys())),
url=dict(default=None),
timeout=dict(default="1m"),
plugin_bin=dict(default="/opt/kibana/bin/kibana", type="path"),

View file

@ -23,28 +23,37 @@ options:
description:
- The command you would like to perform against the cluster.
choices: ['ping', 'kv_test', 'join', 'plan', 'commit']
type: str
config_dir:
description:
- The path to the riak configuration directory
default: /etc/riak
type: path
http_conn:
description:
- The ip address and port that is listening for Riak HTTP queries
default: 127.0.0.1:8098
type: str
target_node:
description:
- The target node for certain operations (join, ping)
default: riak@127.0.0.1
type: str
wait_for_handoffs:
description:
- Number of seconds to wait for handoffs to complete.
type: int
default: 0
wait_for_ring:
description:
- Number of seconds to wait for all nodes to agree on the ring.
type: int
default: 0
wait_for_service:
description:
- Waits for a riak service to come online before continuing.
choices: ['kv']
type: str
validate_certs:
description:
- If C(no), SSL certificates will not be validated. This should only be used
@ -93,8 +102,8 @@ def main():
config_dir=dict(default='/etc/riak', type='path'),
http_conn=dict(required=False, default='127.0.0.1:8098'),
target_node=dict(default='riak@127.0.0.1', required=False),
wait_for_handoffs=dict(default=False, type='int'),
wait_for_ring=dict(default=False, type='int'),
wait_for_handoffs=dict(default=0, type='int'),
wait_for_ring=dict(default=0, type='int'),
wait_for_service=dict(
required=False, default=None, choices=['kv']),
validate_certs=dict(default=True, type='bool'))

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: