aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--defaults/main.yml2
-rw-r--r--tasks/config.yml7
-rw-r--r--templates/etc/rabbitmq/rabbitmq-env.conf.j26
3 files changed, 15 insertions, 0 deletions
diff --git a/defaults/main.yml b/defaults/main.yml
index f3d2c20..2932de7 100644
--- a/defaults/main.yml
+++ b/defaults/main.yml
@@ -16,6 +16,8 @@ rabbitmq_config_ha: false
16 16
17rabbitmq_config_service: false 17rabbitmq_config_service: false
18rabbitmq_config_file: etc/rabbitmq/rabbitmq.config.j2 18rabbitmq_config_file: etc/rabbitmq/rabbitmq.config.j2
19rabbitmq_config_env_file: etc/rabbitmq/rabbitmq-env.conf.j2
20rabbitmq_env_config: {}
19 21
20# rabbitmq_debian_repo: deb http://www.rabbitmq.com/debian/ testing main 22# rabbitmq_debian_repo: deb http://www.rabbitmq.com/debian/ testing main
21#other repos 23#other repos
diff --git a/tasks/config.yml b/tasks/config.yml
index 091cca1..ea1b3c8 100644
--- a/tasks/config.yml
+++ b/tasks/config.yml
@@ -5,3 +5,10 @@
5 dest: "/etc/rabbitmq/rabbitmq.config" 5 dest: "/etc/rabbitmq/rabbitmq.config"
6 become: true 6 become: true
7 notify: "restart rabbitmq-server" 7 notify: "restart rabbitmq-server"
8
9- name: config | Configuring RabbitMQ environemnt
10 template:
11 src: "{{ rabbitmq_config_env_file }}"
12 dest: "/etc/rabbitmq/rabbitmq-env.conf"
13 become: true
14 notify: "restart rabbitmq-server"
diff --git a/templates/etc/rabbitmq/rabbitmq-env.conf.j2 b/templates/etc/rabbitmq/rabbitmq-env.conf.j2
new file mode 100644
index 0000000..8eff6f3
--- /dev/null
+++ b/templates/etc/rabbitmq/rabbitmq-env.conf.j2
@@ -0,0 +1,6 @@
1# {{ ansible_managed }}
2# Note that the variables do not have the RABBITMQ_ prefix.
3#
4{% for key,value in rabbitmq_env_config.iteritems() %}
5{{ key }}={{ value }}
6{% endfor %}