From 633e12bf86694ba57695bdff8dfdb46cabdeae15 Mon Sep 17 00:00:00 2001 From: jiangweidong Date: Thu, 19 Jan 2023 10:14:31 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=85=B6=E4=BB=96mongodb=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E5=8C=96=E6=93=8D=E4=BD=9C=E6=94=AF=E6=8C=81ssl?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../automations/change_secret/database/mongodb/main.yml | 5 +++++ .../automations/gather_accounts/database/mongodb/main.yml | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/apps/accounts/automations/change_secret/database/mongodb/main.yml b/apps/accounts/automations/change_secret/database/mongodb/main.yml index 7f0ae2c6e..517274263 100644 --- a/apps/accounts/automations/change_secret/database/mongodb/main.yml +++ b/apps/accounts/automations/change_secret/database/mongodb/main.yml @@ -30,6 +30,11 @@ login_host: "{{ jms_asset.address }}" login_port: "{{ jms_asset.port }}" login_database: "{{ jms_asset.specific.db_name }}" + ssl: "{{ jms_asset.specific.use_ssl }}" + ssl_ca_certs: "{{ jms_asset.specific.ca_cert }}" + ssl_certfile: "{{ jms_asset.specific.client_key }}" + connection_options: + - tlsAllowInvalidHostnames: "{{ jms_asset.specific.allow_invalid_cert}}" db: "{{ jms_asset.specific.db_name }}" name: "{{ account.username }}" password: "{{ account.secret }}" diff --git a/apps/accounts/automations/gather_accounts/database/mongodb/main.yml b/apps/accounts/automations/gather_accounts/database/mongodb/main.yml index fd7a296b7..d2478d7b5 100644 --- a/apps/accounts/automations/gather_accounts/database/mongodb/main.yml +++ b/apps/accounts/automations/gather_accounts/database/mongodb/main.yml @@ -11,6 +11,11 @@ login_host: "{{ jms_asset.address }}" login_port: "{{ jms_asset.port }}" login_database: "{{ jms_asset.specific.db_name }}" + ssl: "{{ jms_asset.specific.use_ssl }}" + ssl_ca_certs: "{{ jms_asset.specific.ca_cert }}" + ssl_certfile: "{{ jms_asset.specific.client_key }}" + connection_options: + - tlsAllowInvalidHostnames: "{{ jms_asset.specific.allow_invalid_cert}}" filter: users register: db_info