]> git.immae.eu Git - github/fretlink/ansible-rabbitmq.git/commitdiff
rabbitmq-env: add config file for env variables definition
authorPaul Bonaud <paul.bonaud@fretlink.com>
Thu, 20 Dec 2018 15:01:40 +0000 (16:01 +0100)
committerPaul Bonaud <paul.bonaud@fretlink.com>
Thu, 20 Dec 2018 17:55:32 +0000 (18:55 +0100)
defaults/main.yml
tasks/config.yml
templates/etc/rabbitmq/rabbitmq-env.conf.j2 [new file with mode: 0644]

index f3d2c20e04f6a4addc1c2224909d39c0eea72e95..2932de7108e5cb848dd2b75bbf51bd1a154dbf0e 100644 (file)
@@ -16,6 +16,8 @@ rabbitmq_config_ha: false
 
 rabbitmq_config_service: false
 rabbitmq_config_file: etc/rabbitmq/rabbitmq.config.j2
+rabbitmq_config_env_file: etc/rabbitmq/rabbitmq-env.conf.j2
+rabbitmq_env_config: {}
 
 # rabbitmq_debian_repo: deb http://www.rabbitmq.com/debian/ testing main
 #other repos
index 091cca147e3bea2738a05ca0eda0bf443404bb82..ea1b3c88c79cc3fedee7aa08713e5bdd9d32e303 100644 (file)
@@ -5,3 +5,10 @@
     dest: "/etc/rabbitmq/rabbitmq.config"
   become: true
   notify: "restart rabbitmq-server"
+
+- name: config | Configuring RabbitMQ environemnt
+  template:
+    src: "{{ rabbitmq_config_env_file }}"
+    dest: "/etc/rabbitmq/rabbitmq-env.conf"
+  become: true
+  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 (file)
index 0000000..8eff6f3
--- /dev/null
@@ -0,0 +1,6 @@
+# {{ ansible_managed }}
+# Note that the variables do not have the RABBITMQ_ prefix.
+#
+{% for key,value in rabbitmq_env_config.iteritems() %}
+{{ key }}={{ value }}
+{% endfor %}