diff --git a/playbooks/roles/rabbitmq_server/defaults/main.yml b/playbooks/roles/rabbitmq_server/defaults/main.yml index c7566e386d..e0484720c3 100644 --- a/playbooks/roles/rabbitmq_server/defaults/main.yml +++ b/playbooks/roles/rabbitmq_server/defaults/main.yml @@ -34,6 +34,9 @@ rabbitmq_userid: rabbitmq # Name of the rabbitmq cluster rabbitmq_cluster_name: rabbitmq_cluster1 +# Specify a partition recovery strategy (autoheal | pause_minority | ignore) +rabbitmq_cluster_partition_handling: pause_minority + # Rabbitmq open file limits rabbitmq_ulimit: 4096 diff --git a/playbooks/roles/rabbitmq_server/templates/rabbitmq.config.j2 b/playbooks/roles/rabbitmq_server/templates/rabbitmq.config.j2 index 3a178d89a0..834c5af81f 100644 --- a/playbooks/roles/rabbitmq_server/templates/rabbitmq.config.j2 +++ b/playbooks/roles/rabbitmq_server/templates/rabbitmq.config.j2 @@ -1,6 +1,7 @@ [ {rabbit, [ {loopback_users, []}, + {% if rabbitmq_cluster_partition_handling != 'ignore' %}{cluster_partition_handling, {{ rabbitmq_cluster_partition_handling }}},{% endif %} {cluster_nodes, { [ {% for host in groups['rabbitmq_all'] %}'rabbit@{{ hostvars[host]['ansible_ssh_host'] }}'{% if not loop.last %}, {% endif %}{% endfor %}], disc} }