Rabbit config changes dont initiate a restart

Restart rabbit-server when the config files change. This required
the templates to be rendered from the post_install playbook to
prevent attempting to restart a service that had not yet been
installed.

Change-Id: I7c9ba030aa0e58d3fb5fa3cb6f17dd013f36471c
Closes-Bug: #1460115
This commit is contained in:
Tom Cameron
2015-07-02 17:21:13 -04:00
parent 5a228e28cb
commit 90bef6a3c4
2 changed files with 12 additions and 11 deletions

View File

@@ -32,8 +32,19 @@
- rabbitmq-config
- rabbitmq-cluster
- name: Create rabbitmq config
register: rabbit_config_changed
template:
src: "{{ item.src }}"
dest: "{{ item.dest }}"
with_items:
- { src: "rabbitmq.config.j2", dest: "/etc/rabbitmq/rabbitmq.config" }
- { src: "rabbitmq-server.j2", dest: "/etc/default/rabbitmq-server" }
tags:
- rabbitmq-config
- include: rabbitmq_restart.yml
when: rabbitmq_plugin|changed or rabbitmq_queue_mirror|changed
when: rabbit_config_changed|changed or rabbitmq_plugin|changed or rabbitmq_queue_mirror|changed
- name: Ensure rabbitmq user
rabbitmq_user:

View File

@@ -48,13 +48,3 @@
- { path: "/etc/rabbitmq/" }
tags:
- rabbitmq-config
- name: Create rabbitmq config
template:
src: "{{ item.src }}"
dest: "{{ item.dest }}"
with_items:
- { src: "rabbitmq.config.j2", dest: "/etc/rabbitmq/rabbitmq.config" }
- { src: "rabbitmq-server.j2", dest: "/etc/default/rabbitmq-server" }
tags:
- rabbitmq-config