diff --git a/plugins/doc_fragments/redis.py b/plugins/doc_fragments/redis.py index ac6d96fb131..e7af25ec8fd 100644 --- a/plugins/doc_fragments/redis.py +++ b/plugins/doc_fragments/redis.py @@ -31,6 +31,11 @@ class ModuleDocFragment(object): - Specify the password to authenticate with. - Usually not used when target is localhost. type: str + tls: + description: + - Specify whether or not to use TLS for the connection. + type: bool + default: true validate_certs: description: - Specify whether or not to validate TLS certificates. diff --git a/plugins/doc_fragments/redis_tls_false.py b/plugins/doc_fragments/redis_tls_false.py deleted file mode 100644 index 8d19489c24d..00000000000 --- a/plugins/doc_fragments/redis_tls_false.py +++ /dev/null @@ -1,19 +0,0 @@ -# -*- coding: utf-8 -*- - -# Copyright: (c) 2021, Andreas Botzner -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) - -from __future__ import (absolute_import, division, print_function) -__metaclass__ = type - - -class ModuleDocFragment(object): - # Common parameters for Redis modules - DOCUMENTATION = r''' -options: - tls: - description: - - Specify whether or not to use TLS for the connection. - type: bool - default: false -''' diff --git a/plugins/doc_fragments/redis_tls_true.py b/plugins/doc_fragments/redis_tls_true.py deleted file mode 100644 index 2713c2ef68f..00000000000 --- a/plugins/doc_fragments/redis_tls_true.py +++ /dev/null @@ -1,19 +0,0 @@ -# -*- coding: utf-8 -*- - -# Copyright: (c) 2021, Andreas Botzner -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) - -from __future__ import (absolute_import, division, print_function) -__metaclass__ = type - - -class ModuleDocFragment(object): - # Common parameters for Redis modules - DOCUMENTATION = r''' -options: - tls: - description: - - Specify whether or not to use TLS for the connection. - type: bool - default: true -''' diff --git a/plugins/modules/database/misc/redis.py b/plugins/modules/database/misc/redis.py index 8a0689f92ef..a2cb5393631 100644 --- a/plugins/modules/database/misc/redis.py +++ b/plugins/modules/database/misc/redis.py @@ -22,15 +22,46 @@ - C(replica) sets a redis instance in replica or master mode. (C(slave) is an alias for C(replica).) choices: [ config, flush, replica, slave ] type: str + login_password: + description: + - The password used to authenticate with (usually not used) + type: str + login_host: + description: + - The host running the database + default: localhost + type: str + login_port: + description: + - The port to connect to + default: 6379 + type: int tls: - default: false - version_added: 4.6.0 + description: + - Specify whether or not to use TLS for the connection. + type: bool + default: false + version_added: 4.6.0 login_user: - version_added: 4.6.0 + description: + - Specify the user to authenticate with. + - Requires L(redis,https://pypi.org/project/redis) >= 3.4.0. + type: str + version_added: 4.6.0 validate_certs: - version_added: 4.6.0 + description: + - Specify whether or not to validate TLS certificates. + - This should only be turned off for personally controlled sites or with + C(localhost) as target. + type: bool + default: true + version_added: 4.6.0 ca_certs: - version_added: 4.6.0 + description: + - Path to root certificates file. If not set and I(tls) is + set to C(true), certifi ca-certificates will be used. + type: str + version_added: 4.6.0 master_host: description: - The host of the master instance [replica command] @@ -70,10 +101,6 @@ Units are case insensitive i.e. 1m = 1mb = 1M = 1MB. type: str -extends_documentation_fragment: - - community.general.redis.documentation - - community.general.redis_tls_false.documentation - notes: - Requires the redis-py Python package on the remote host. You can install it with pip (pip install redis) or with a package manager. diff --git a/plugins/modules/database/misc/redis_data.py b/plugins/modules/database/misc/redis_data.py index 55985d4b72b..587b37d04fa 100644 --- a/plugins/modules/database/misc/redis_data.py +++ b/plugins/modules/database/misc/redis_data.py @@ -58,7 +58,6 @@ extends_documentation_fragment: - community.general.redis.documentation - - community.general.redis_tls_true.documentation seealso: - module: community.general.redis_data_incr diff --git a/plugins/modules/database/misc/redis_data_incr.py b/plugins/modules/database/misc/redis_data_incr.py index 0dfbd5420a9..e9e03941e4e 100644 --- a/plugins/modules/database/misc/redis_data_incr.py +++ b/plugins/modules/database/misc/redis_data_incr.py @@ -41,7 +41,6 @@ extends_documentation_fragment: - community.general.redis.documentation - - community.general.redis_tls_true.documentation notes: - For C(check_mode) to work, the specified I(redis_user) needs permission to diff --git a/plugins/modules/database/misc/redis_data_info.py b/plugins/modules/database/misc/redis_data_info.py index 339c7b42a07..7ecfd4a2349 100644 --- a/plugins/modules/database/misc/redis_data_info.py +++ b/plugins/modules/database/misc/redis_data_info.py @@ -24,7 +24,6 @@ extends_documentation_fragment: - community.general.redis - - community.general.redis_tls_true.documentation seealso: - module: community.general.redis_data