ceilometer: process custom event_pipeline.yaml with merge_yaml
Allow more flexibility by adding a host specific template. Also using the merge_yaml action allow us to drop the logic around deciding which template to use. Change-Id: I41a3226679c622e5e98df074cee195e8436ea45b
This commit is contained in:
parent
26ba26cd18
commit
50abf90f59
@ -252,41 +252,20 @@
|
|||||||
notify:
|
notify:
|
||||||
- Restart ceilometer-notification container
|
- Restart ceilometer-notification container
|
||||||
|
|
||||||
- name: Check custom event_pipeline.yaml exists
|
|
||||||
stat:
|
|
||||||
path: "{{ node_custom_config }}/ceilometer/event_pipeline.yaml"
|
|
||||||
delegate_to: localhost
|
|
||||||
register: ceilometer_event_pipeline_file
|
|
||||||
|
|
||||||
- name: Copying over event_pipeline.yaml
|
- name: Copying over event_pipeline.yaml
|
||||||
vars:
|
vars:
|
||||||
service: "{{ ceilometer_services['ceilometer-notification'] }}"
|
service: "{{ ceilometer_services['ceilometer-notification'] }}"
|
||||||
copy:
|
merge_yaml:
|
||||||
src: "{{ node_custom_config }}/ceilometer/event_pipeline.yaml"
|
sources:
|
||||||
dest: "{{ node_config_directory }}/ceilometer-notification/event_pipeline.yaml"
|
- "{{ role_path }}/templates/event_pipeline.yaml.j2"
|
||||||
force: True
|
- "{{ node_custom_config }}/ceilometer/event_pipeline.yaml"
|
||||||
mode: "0660"
|
- "{{ node_custom_config }}/ceilometer/{{ inventory_hostname }}/event_pipeline.yaml"
|
||||||
become: true
|
|
||||||
register: ceilometer_event_pipeline_overwriting
|
|
||||||
when:
|
|
||||||
- ceilometer_event_pipeline_file.stat.exists
|
|
||||||
- inventory_hostname in groups[service.group]
|
|
||||||
- service.enabled | bool
|
|
||||||
notify:
|
|
||||||
- Restart ceilometer-notification container
|
|
||||||
|
|
||||||
- name: Copying over event_pipeline.yaml for notification service
|
|
||||||
vars:
|
|
||||||
service: "{{ ceilometer_services['ceilometer-notification'] }}"
|
|
||||||
template:
|
|
||||||
src: "event_pipeline.yaml.j2"
|
|
||||||
dest: "{{ node_config_directory }}/ceilometer-notification/event_pipeline.yaml"
|
dest: "{{ node_config_directory }}/ceilometer-notification/event_pipeline.yaml"
|
||||||
mode: "0660"
|
mode: "0660"
|
||||||
become: true
|
become: true
|
||||||
when:
|
when:
|
||||||
- inventory_hostname in groups[service.group]
|
- inventory_hostname in groups[service.group]
|
||||||
- service.enabled | bool
|
- service.enabled | bool
|
||||||
- not ceilometer_event_pipeline_file.stat.exists
|
|
||||||
notify:
|
notify:
|
||||||
- Restart ceilometer-notification container
|
- Restart ceilometer-notification container
|
||||||
|
|
||||||
|
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
A custom ``event_pipeline.yaml`` file for the Ceilometer notification
|
||||||
|
service is now processed with ``merge_yaml``. This allows Jinja2 to be
|
||||||
|
used. Furthermore, it is possible to have a global
|
||||||
|
``event_pipeline.yaml`` and host-specific ``event_pipeline.yaml``
|
||||||
|
files.
|
Loading…
x
Reference in New Issue
Block a user