Skip to content
Snippets Groups Projects
Commit a018e60c authored by Zuul's avatar Zuul Committed by Gerrit Code Review
Browse files

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

parents 659dd211 19ec4017
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment