Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update roles/mongodb_auth/tasks/main.yml
Browse files Browse the repository at this point in the history
Co-authored-by: kvelarde-itential <[email protected]>
Madias2222 and kvelarde-itential authored Jan 15, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent ecaf5ee commit 0f7b162
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions roles/mongodb_auth/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -19,12 +19,12 @@
when: mongodb_replication | bool

- name: Check if key exists on the first node
ansible.builtin.stat:
path: "{{ mongo_auth_keyfile_destination }}"
when:
- inventory_hostname == groups['mongodb'][0]
- mongodb_replication | bool
run_once: true
ansible.builtin.stat:
path: "{{ mongo_auth_keyfile_destination }}"
register: keyfile_stat

- name: Generate key (if missing) and copy to all nodes

0 comments on commit 0f7b162

Please sign in to comment.