diff options
author | Paul Bonaud <paul.bonaud@fretlink.com> | 2018-12-20 16:01:40 +0100 |
---|---|---|
committer | Paul Bonaud <paul.bonaud@fretlink.com> | 2018-12-20 18:55:32 +0100 |
commit | b74e7e9a54cc95a00e3377c36ddc6533e966cff1 (patch) | |
tree | 40d15401e265ea75f6803270a78d8170fac6a062 | |
parent | d58696271f166b50faa2705fdda6337c1ffb493c (diff) | |
download | ansible-rabbitmq-b74e7e9a54cc95a00e3377c36ddc6533e966cff1.tar.gz ansible-rabbitmq-b74e7e9a54cc95a00e3377c36ddc6533e966cff1.tar.zst ansible-rabbitmq-b74e7e9a54cc95a00e3377c36ddc6533e966cff1.zip |
rabbitmq-env: add config file for env variables definition
-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 f3d2c20..2932de7 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 %} | ||