From e97e47a488463a80afb464b30aca25878aae8c91 Mon Sep 17 00:00:00 2001 From: JoeGun <39112190+JonathanGun@users.noreply.github.com> Date: Mon, 23 Dec 2024 11:48:47 +0700 Subject: [PATCH] fix: add no_log and quiet to read-write patch task --- tasks/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tasks/main.yml b/tasks/main.yml index d9b1632..1bc7a16 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -40,9 +40,10 @@ # patch known issue default rw concern - name: Set default read-write concern - ansible.builtin.command: "{{ 'mongosh' if mongodb_version.split('.')[0] | int >= 5 else 'mongo' }} -u {{ mongodb_root_admin_name }} -p {{ mongodb_root_admin_password }} --eval 'db.adminCommand({\"setDefaultRWConcern\": 1,\"defaultWriteConcern\": { \"w\": 1 }})'" + ansible.builtin.command: "{{ 'mongosh' if mongodb_version.split('.')[0] | int >= 5 else 'mongo' }} --quiet -u {{ mongodb_root_admin_name }} -p {{ mongodb_root_admin_password }} --eval 'db.adminCommand({\"setDefaultRWConcern\": 1,\"defaultWriteConcern\": { \"w\": 1 }})'" when: ( mongodb_replication_replset | length > 0 and mongodb_master is defined and mongodb_master ) + no_log: true tags: [mongodb] - name: Include replication configuration