Merge "Support custom monasca-notification templates"

This commit is contained in:
Zuul 2018-11-20 09:41:21 +00:00 committed by Gerrit Code Review
commit 445e4f7640
3 changed files with 28 additions and 0 deletions

View File

@ -150,6 +150,7 @@
- service.enabled | bool
- config_json.changed | bool
or monasca_notification_confs.changed | bool
or monasca_notification_plugin_templates.changed | bool
or monasca_notification_container.changed | bool
- name: Restart monasca-persister container

View File

@ -336,6 +336,27 @@
notify:
- Restart monasca-notification container
- name: Check for monasca-notification templates
local_action: stat path="{{ node_custom_config }}/monasca/notification_templates"
run_once: True
register: notification_templates
- name: Copying over monasca-notification templates
vars:
service: "{{ monasca_services['monasca-notification'] }}"
copy:
src: "{{ node_custom_config }}/monasca/notification_templates"
dest: "{{ node_config_directory }}/monasca-notification/"
mode: "0660"
become: true
register: monasca_notification_plugin_templates
when:
- notification_templates.stat.exists and notification_templates.stat.isdir
- inventory_hostname in groups[service['group']]
- service.enabled | bool
notify:
- Restart monasca-notification container
- name: Copying over monasca-persister config
vars:
service: "{{ monasca_services['monasca-persister'] }}"

View File

@ -6,6 +6,12 @@
"dest": "/etc/monasca/notification.conf",
"owner": "monasca",
"perm": "0600"
},
{
"source": "{{ container_config_directory }}/notification_templates/*",
"dest": "/etc/monasca/",
"owner": "monasca",
"perm": "0600"
}
],
"permissions": [