From f2c32900b2aa5f947d0f1a597c9b0ea9ebe80ff8 Mon Sep 17 00:00:00 2001 From: Matvey Sysolyakin Date: Tue, 28 Jan 2025 18:24:39 +0300 Subject: [PATCH] delete cloud section & add allowConnectionsWithoutCertificates option to config --- defaults/main.yml | 1 + templates/mongod.conf.j2 | 13 +------------ 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index d67c41f6..b5b31026 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -34,6 +34,7 @@ mongodb_net_port: 27017 # Specify port number mongodb_net_ssl: disabled # Enable or disable ssl connections mongodb_net_ssl_mode: "" # Set the ssl mode (RequireSSL / preferSSL / AllowSSL / disabled) mongodb_net_ssl_pemfile: "" # Location of the pemfile to use for ssl +mongodb_net_ssl_conn_without_certs: "false" mongodb_net_ssl_host: "" # Valid ssl hostname ## processManagement Options diff --git a/templates/mongod.conf.j2 b/templates/mongod.conf.j2 index c92f3e10..ac7688f5 100644 --- a/templates/mongod.conf.j2 +++ b/templates/mongod.conf.j2 @@ -9,6 +9,7 @@ net: ssl: mode: {{ mongodb_net_ssl_mode }} PEMKeyFile: {{ mongodb_net_ssl_pemfile }} + allowConnectionsWithoutCertificates: {{ mongodb_net_ssl_conn_without_certs }} {% endif -%} {% if mongodb_config['net'] is defined and mongodb_config['net'] is iterable -%} {% for item in mongodb_config['net'] -%} @@ -102,18 +103,6 @@ operationProfiling: {% endfor %} {% endif %} -{% if mongodb_major_version is version("4.0", ">=") -%} -cloud: - monitoring: - free: - state: {{ mongodb_cloud_monitoring_free_state }} - {% if mongodb_config['cloud'] is defined and mongodb_config['cloud'] is iterable -%} - {% for item in mongodb_config['cloud'] -%} - {{ item }} - {% endfor %} - {% endif %} -{% endif %} - {% if mongodb_set_parameters -%} setParameter: {% for key, value in mongodb_set_parameters.items() -%}