diff --git a/ansible/roles/rabbitmq/defaults/main.yml b/ansible/roles/rabbitmq/defaults/main.yml index 1d93ca5491440b0e87901586cb382b405e650c14..6f42e12a21eac2294ec5797113ee2a83cce4b41e 100644 --- a/ansible/roles/rabbitmq/defaults/main.yml +++ b/ansible/roles/rabbitmq/defaults/main.yml @@ -74,3 +74,5 @@ rabbitmq_pid_file: "/var/lib/rabbitmq/mnesia/rabbitmq.pid" rabbitmq_server_additional_erl_args: "" # Dict of TLS options for RabbitMQ. Keys will be prefixed with 'ssl_options.'. rabbitmq_tls_options: {} +# To avoid split-brain +rabbitmq_cluster_partition_handling: "pause_minority" diff --git a/ansible/roles/rabbitmq/templates/rabbitmq.conf.j2 b/ansible/roles/rabbitmq/templates/rabbitmq.conf.j2 index 25ec6b46f354e2f117435739e65b367d4cb3a22e..c7c46cd33826bd2a7fdc99dcbcceb4091fecb3d4 100644 --- a/ansible/roles/rabbitmq/templates/rabbitmq.conf.j2 +++ b/ansible/roles/rabbitmq/templates/rabbitmq.conf.j2 @@ -6,8 +6,7 @@ listeners.ssl.1 = {{ api_interface_address }}:{{ role_rabbitmq_port }} {% else %} listeners.tcp.1 = {{ api_interface_address }}:{{ role_rabbitmq_port }} {% endif %} -{# NOTE: to avoid split-brain #} -cluster_partition_handling = pause_minority +cluster_partition_handling = {{ rabbitmq_cluster_partition_handling }} management.listener.ip = {{ api_interface_address }} management.listener.port = {{ role_rabbitmq_management_port }}