We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2294132 commit 9733e01Copy full SHA for 9733e01
1 file changed
roles/mongo/tasks/cluster.yml
@@ -41,11 +41,15 @@
41
- name: Set fact for arbiter index number
42
ansible.builtin.set_fact:
43
arbiter_index: "{{ hostid }}"
44
- when: hostvars[item].mongo_arbiter
+ when: hostvars[item].mongo_arbiter is defined and hostvars[item].mongo_arbiter
45
loop: "{{ mongo_servers }}"
46
loop_control:
47
index_var: hostid
48
49
+- name: Debug host_id
50
+ ansible.builtin.debug:
51
+ msg: "{{ hostid }}"
52
+
53
- name: Initial cluster initialisation
54
community.mongodb.mongodb_replicaset:
55
login_host: localhost
0 commit comments