Skip to content

Commit 37fb1ca

Browse files
committed
Support corosync without a nodelist (so hostname is used as node name)
1 parent 3c83dc0 commit 37fb1ca

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

templates/corosync.conf.j2

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
totem {
22
version: 2
33
cluster_name: {{ pacemaker_corosync_group }}
4+
{% if pacemaker_enable_nodelist|default(true) %}
45
transport: udpu
6+
{% endif %}
57
interface {
68
ringnumber: 0
79
bindnetaddr: {{ hostvars[inventory_hostname]['ansible_' + pacemaker_corosync_ring_interface].ipv4.address }}
@@ -18,8 +20,12 @@ quorum {
1820
wait_for_all: 1
1921
last_man_standing: 1
2022
{% endif %}
23+
{% if not pacemaker_enable_nodelist|default(true) %}
24+
expected_votes: {{ groups[pacemaker_corosync_group]|count }}
25+
{% endif %}
2126
}
2227

28+
{% if pacemaker_enable_nodelist|default(true) %}
2329
nodelist {
2430
{% for node in groups[pacemaker_corosync_group]|sort %}
2531
node {
@@ -29,6 +35,7 @@ nodelist {
2935
}
3036
{% endfor %}
3137
}
38+
{% endif %}
3239

3340
logging {
3441
to_logfile: yes

0 commit comments

Comments
 (0)