Merge "[prometheus-alertmanager] use template/first_found instead of merge_yaml."

This commit is contained in:
Zuul 2018-08-15 13:36:05 +00:00 committed by Gerrit Code Review
commit a018e60c2a

View File

@ -44,16 +44,17 @@
- name: Copying over prometheus alertmanager config file
vars:
service: "{{ prometheus_services['prometheus-alertmanager']}}"
merge_yaml:
sources:
- "{{ node_custom_config }}/prometheus/{{ inventory_hostname }}/prometheus-alertmanager.yml"
- "{{ node_custom_config }}/prometheus/prometheus-alertmanager.yml"
- "{{ role_path }}/templates/prometheus-alertmanager.yml.j2"
template:
src: "{{ item }}"
dest: "{{ node_config_directory }}/prometheus-alertmanager/prometheus-alertmanager.yml"
register: prometheus_confs
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
with_first_found:
- "{{ node_custom_config }}/prometheus/{{ inventory_hostname }}/prometheus-alertmanager.yml"
- "{{ node_custom_config }}/prometheus/prometheus-alertmanager.yml"
- "{{ role_path }}/templates/prometheus-alertmanager.yml.j2"
notify:
- Restart prometheus-alertmanager container