Merge "[prometheus-alertmanager] use template/first_found instead of merge_yaml."
This commit is contained in:
commit
a018e60c2a
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user