diff options
-rw-r--r-- | defaults/main.yml | 2 | ||||
-rw-r--r-- | tasks/config.yml | 7 | ||||
-rw-r--r-- | templates/etc/rabbitmq/rabbitmq-env.conf.j2 | 6 |
3 files changed, 15 insertions, 0 deletions
diff --git a/defaults/main.yml b/defaults/main.yml index e874af1..f8dd8f9 100644 --- a/defaults/main.yml +++ b/defaults/main.yml | |||
@@ -16,6 +16,8 @@ rabbitmq_config_ha: false | |||
16 | 16 | ||
17 | rabbitmq_config_service: false | 17 | rabbitmq_config_service: false |
18 | rabbitmq_config_file: etc/rabbitmq/rabbitmq.config.j2 | 18 | rabbitmq_config_file: etc/rabbitmq/rabbitmq.config.j2 |
19 | rabbitmq_config_env_file: etc/rabbitmq/rabbitmq-env.conf.j2 | ||
20 | rabbitmq_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 %} | ||