Skip to content

Commit 42487b9

Browse files
committed
fixed mongodb_replication_params is undefined error (closes #37)
1 parent 61b0083 commit 42487b9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tasks/replication_init_auth.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
host_type: "{{ item.host_type|default('replica') }}"
1212
hidden: "{{ item.hidden|default(false) }}"
1313
priority: "{{ item.priority|default(1.0) }}"
14+
when: mongodb_replication_params is defined
1415
with_items:
1516
- "{{ mongodb_replication_params }}"
1617
register: mongodb_replica_init
@@ -31,6 +32,7 @@
3132
host_type: "{{ item.host_type|default('replica') }}"
3233
hidden: "{{ item.hidden|default(false) }}"
3334
priority: "{{ item.priority|default(1.0) }}"
35+
when: mongodb_replication_params is defined
3436
with_items:
3537
- "{{ mongodb_replication_params }}"
3638
when: mongodb_replica_init|failed

0 commit comments

Comments
 (0)