diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-05 16:18:34 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-05 16:18:34 +0000 |
commit | 3667197efb7b18ec842efd504785965911f8ac4b (patch) | |
tree | 0b986a4bc6879d080b100666a97cdabbc9ca1f28 /ansible_collections/community/mongodb | |
parent | Adding upstream version 9.5.1+dfsg. (diff) | |
download | ansible-3667197efb7b18ec842efd504785965911f8ac4b.tar.xz ansible-3667197efb7b18ec842efd504785965911f8ac4b.zip |
Adding upstream version 10.0.0+dfsg.upstream/10.0.0+dfsg
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ansible_collections/community/mongodb')
6 files changed, 48 insertions, 10 deletions
diff --git a/ansible_collections/community/mongodb/CHANGELOG.rst b/ansible_collections/community/mongodb/CHANGELOG.rst index efe8e7a47..6bb98a0a9 100644 --- a/ansible_collections/community/mongodb/CHANGELOG.rst +++ b/ansible_collections/community/mongodb/CHANGELOG.rst @@ -4,6 +4,19 @@ Community.MongoDB Release Notes .. contents:: Topics +v1.7.4: +========= + +Release Summary +---------------- + +This release is a maintenance release. + +Minor Changes +------------- + +- 644 - mongodb_shell - Add ssl/tls options. + v1.7.3: ========= diff --git a/ansible_collections/community/mongodb/FILES.json b/ansible_collections/community/mongodb/FILES.json index f94843a96..ababe90bd 100644 --- a/ansible_collections/community/mongodb/FILES.json +++ b/ansible_collections/community/mongodb/FILES.json @@ -95,7 +95,7 @@ "name": "changelogs/changelog.yaml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "d7e3cf154cb0134ac530a4ec411e69e5d21ed2d500e5bc219ddc983625779f64", + "chksum_sha256": "804197bdc9c22ac7d7217004da5b984dfaf3cc90193eb0c7c955e85ca7c6510f", "format": 1 }, { @@ -368,7 +368,7 @@ "name": "plugins/modules/mongodb_shell.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "9ca34eb689335da81215f97904a77f42eac95406f01986ea61b36e3f71f2b963", + "chksum_sha256": "643fc68eecb01e46cc69b5a47212e6b24f8ec04e74e0849db1db4f8003da4ad1", "format": 1 }, { @@ -2370,7 +2370,7 @@ "name": "CHANGELOG.rst", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "dd8f971dbb162351148320dbed19aa7fb8e49aa683205224ea51defff77fe3f3", + "chksum_sha256": "32fd83c1f49e6ee9cc991c66b52c524a2816652658a1baeef5808f0ef6cfde9b", "format": 1 }, { @@ -2384,7 +2384,7 @@ "name": "README.md", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "65a9319fb932c67923de4f992f3119feae296f85411b5cffb00aa04b93a44f29", + "chksum_sha256": "94362aca9a294e736fa71510ec537ca0db93c2018496d44a681abb0bc6fa6fd8", "format": 1 }, { diff --git a/ansible_collections/community/mongodb/MANIFEST.json b/ansible_collections/community/mongodb/MANIFEST.json index aa6035a5e..c9ddd1e0d 100644 --- a/ansible_collections/community/mongodb/MANIFEST.json +++ b/ansible_collections/community/mongodb/MANIFEST.json @@ -2,7 +2,7 @@ "collection_info": { "namespace": "community", "name": "mongodb", - "version": "1.7.3", + "version": "1.7.4", "authors": [ "Ansible (https://github.com/ansible)", "Rhys Campbell (https://github.com/rhysmeister)", @@ -36,7 +36,7 @@ "name": "FILES.json", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "72e4c95bc97cb1a5e68ca35b8c8dffa1bda536bae32ca66bdaa676747ba0244f", + "chksum_sha256": "0c106846fbfff63ae2d1cc38e3528523a6a8b63a5e7662c7732c71a251d97a92", "format": 1 }, "format": 1 diff --git a/ansible_collections/community/mongodb/README.md b/ansible_collections/community/mongodb/README.md index 66e50daef..6ce5a3a41 100644 --- a/ansible_collections/community/mongodb/README.md +++ b/ansible_collections/community/mongodb/README.md @@ -145,6 +145,7 @@ cd git/ansible_collections/community ```bash git clone https://github.com/ansible-collections/community.mongodb.git ./mongodb git clone https://github.com/ansible-collections/community.general.git ./general +git clone https://github.com/ansible-collections/community.crypto.git ./crypto ``` * Create and activate a virtual environment. diff --git a/ansible_collections/community/mongodb/changelogs/changelog.yaml b/ansible_collections/community/mongodb/changelogs/changelog.yaml index 641f7c62f..26cac23f0 100644 --- a/ansible_collections/community/mongodb/changelogs/changelog.yaml +++ b/ansible_collections/community/mongodb/changelogs/changelog.yaml @@ -335,3 +335,8 @@ releases: This release is a maintenance release. bugfixes: - 641 - mongodb_mongod - Add test condition for storage option in mongod.conf template file. + 1.7.4: + release_summary: | + This release is a maintenance release. + minor_changes: + - 644 - mongodb_shell - Add ssl/tls options. diff --git a/ansible_collections/community/mongodb/plugins/modules/mongodb_shell.py b/ansible_collections/community/mongodb/plugins/modules/mongodb_shell.py index 618cafae9..b9c9462b0 100644 --- a/ansible_collections/community/mongodb/plugins/modules/mongodb_shell.py +++ b/ansible_collections/community/mongodb/plugins/modules/mongodb_shell.py @@ -24,6 +24,7 @@ description: extends_documentation_fragment: - community.mongodb.login_options + - community.mongodb.ssl_options options: mongo_cmd: @@ -195,7 +196,7 @@ import os __metaclass__ = type from ansible_collections.community.mongodb.plugins.module_utils.mongodb_common import ( - mongodb_common_argument_spec + load_mongocnf, mongodb_common_argument_spec ) from ansible_collections.community.mongodb.plugins.module_utils.mongodb_shell import ( @@ -208,7 +209,7 @@ from ansible_collections.community.mongodb.plugins.module_utils.mongodb_shell im def main(): - argument_spec = mongodb_common_argument_spec(ssl_options=False) + argument_spec = mongodb_common_argument_spec(ssl_options=True) argument_spec.update( mongo_cmd=dict(type='str', default="mongosh"), file=dict(type='str', required=False), @@ -267,16 +268,34 @@ def main(): omit = module.params['omit'] + username = module.params['login_user'] + password = module.params['login_password'] + + credentials = load_mongocnf() + if credentials: + if not username: + username = credentials['user'] + if not password: + password = credentials['password'] + args = add_arg_to_cmd(args, "--host", module.params['login_host'], omit=omit) args = add_arg_to_cmd(args, "--port", module.params['login_port'], omit=omit) - args = add_arg_to_cmd(args, "--username", module.params['login_user'], omit=omit) - args = add_arg_to_cmd(args, "--password", module.params['login_password'], omit=omit) + args = add_arg_to_cmd(args, "--username", username, omit=omit) + args = add_arg_to_cmd(args, "--password", password, omit=omit) args = add_arg_to_cmd(args, "--authenticationDatabase", module.params['login_database'], omit=omit) + args = add_arg_to_cmd(args, "--authenticationMechanism", module.params['auth_mechanism'], omit=omit) args = add_arg_to_cmd(args, "--eval", module.params['eval'], omit=omit) args = add_arg_to_cmd(args, "--nodb", None, module.params['nodb'], omit=omit) args = add_arg_to_cmd(args, "--norc", None, module.params['norc'], omit=omit) args = add_arg_to_cmd(args, "--quiet", None, module.params['quiet'], omit=omit) + args = add_arg_to_cmd(args, "--tls", None, module.params['ssl'], omit=omit) + args = add_arg_to_cmd(args, "--tlsAllowInvalidCertificates", None, module.params['ssl_cert_reqs'] in ('CERT_NONE', 'CERT_OPTIONAL'), omit=omit) + args = add_arg_to_cmd(args, "--tlsCAFile", module.params['ssl_ca_certs'], omit=omit) + args = add_arg_to_cmd(args, "--tlsCRLFile", module.params['ssl_crlfile'], omit=omit) + args = add_arg_to_cmd(args, "--tlsCertificateKeyFile", module.params['ssl_keyfile'], omit=omit) + args = add_arg_to_cmd(args, "--tlsCertificateKeyFilePassword", module.params['ssl_pem_passphrase'], omit=omit) + additional_args = module.params['additional_args'] if additional_args is not None: for key, value in additional_args.items(): |