Skip to content

Commit

Permalink
fix: add no_log and quiet to read-write patch task
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanGun authored Dec 23, 2024
1 parent 9aeff6e commit e97e47a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e97e47a

Please sign in to comment.