From 080952159c6abe12ea0dc7645b219ac20bc9d88c Mon Sep 17 00:00:00 2001 From: Maarten Bezemer Date: Thu, 8 Dec 2016 15:40:22 +0100 Subject: [PATCH] Make ports configurable --- defaults/main.yml | 5 ++++- templates/etc/default/rabbitmq-server.j2 | 2 ++ templates/etc/rabbitmq/rabbitmq.config.j2 | 3 ++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 4dc8587..eca8d58 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -11,6 +11,10 @@ rabbitmq_use_longname: 'false' rabbitmq_logrotate_period: weekly rabbitmq_logrotate_amount: 20 +rabbitmq_amqp_port: 5672 +rabbitmq_epmd_port: 4369 +rabbitmq_node_port: 25672 + rabbitmq_instant_queues: false rabbitmq_instant_shovels: false @@ -46,4 +50,3 @@ rabbitmq_shovels: - shovel_name: shovel_json: '' - diff --git a/templates/etc/default/rabbitmq-server.j2 b/templates/etc/default/rabbitmq-server.j2 index 95e54f7..8072372 100644 --- a/templates/etc/default/rabbitmq-server.j2 +++ b/templates/etc/default/rabbitmq-server.j2 @@ -8,3 +8,5 @@ # ulimit -n {{ rabbitmq_ulimit_open_files }} +ERL_EPMD_PORT={{ rabbitmq_epmd_port }} +RABBITMQ_NODE_PORT= {{ rabbitmq_node_port }} diff --git a/templates/etc/rabbitmq/rabbitmq.config.j2 b/templates/etc/rabbitmq/rabbitmq.config.j2 index 5786287..f75c86e 100644 --- a/templates/etc/rabbitmq/rabbitmq.config.j2 +++ b/templates/etc/rabbitmq/rabbitmq.config.j2 @@ -1,7 +1,8 @@ [ {rabbit, [ + {tcp_listeners, [{{ rabbitmq_amqp_port }}]}, {vm_memory_high_watermark, {{ rabbitmq_memory_high_watermark }}} -{% if rabbitmq_ssl %}, +{%- if rabbitmq_ssl %}, {ssl_listeners, [{{ rabbitmq_ssl_port }}]}, {ssl_options, [ {% if rabbitmq_ssl_use_snakeoil_cert %}