role service-prometheus: fix loop
statements
This commit is contained in:
parent
00551d452a
commit
64604d0a59
2 changed files with 2 additions and 3 deletions
|
@ -35,12 +35,11 @@
|
||||||
|
|
||||||
- name: mkdir for alertmanager data (silences.json for now)
|
- name: mkdir for alertmanager data (silences.json for now)
|
||||||
file:
|
file:
|
||||||
path: "{{ item }}"
|
path: "{{ alertmanager_db_path }}"
|
||||||
state: directory
|
state: directory
|
||||||
owner: "{{ prometheus_user }}"
|
owner: "{{ prometheus_user }}"
|
||||||
group: "{{ prometheus_group }}"
|
group: "{{ prometheus_group }}"
|
||||||
mode: "u=rwx,g=rx,o="
|
mode: "u=rwx,g=rx,o="
|
||||||
loop: "{{ alertmanager_db_path }}"
|
|
||||||
|
|
||||||
- name: copy alertmanager systemd config
|
- name: copy alertmanager systemd config
|
||||||
template:
|
template:
|
||||||
|
|
|
@ -54,7 +54,7 @@
|
||||||
src: "{{ playbook_dir }}/{{ item.value.src }}"
|
src: "{{ playbook_dir }}/{{ item.value.src }}"
|
||||||
dest: "{{ prometheus_rule_path }}/{{ item.value.dest }}"
|
dest: "{{ prometheus_rule_path }}/{{ item.value.dest }}"
|
||||||
validate: "{{ prometheus_daemon_dir }}/promtool check rules %s"
|
validate: "{{ prometheus_daemon_dir }}/promtool check rules %s"
|
||||||
loop: '{{ prometheus_rule_files | dict2items | default({}) }}'
|
loop: '{{ prometheus_rule_files | default({}) | dict2items }}'
|
||||||
notify:
|
notify:
|
||||||
- restart prometheus
|
- restart prometheus
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue