role service-prometheus: fix loop statements

This commit is contained in:
Julian Labus 2018-09-18 14:57:56 +02:00
parent 00551d452a
commit 64604d0a59
No known key found for this signature in database
GPG key ID: 8AF209F2C6B3572A
2 changed files with 2 additions and 3 deletions

View file

@ -35,12 +35,11 @@
- name: mkdir for alertmanager data (silences.json for now)
file:
path: "{{ item }}"
path: "{{ alertmanager_db_path }}"
state: directory
owner: "{{ prometheus_user }}"
group: "{{ prometheus_group }}"
mode: "u=rwx,g=rx,o="
loop: "{{ alertmanager_db_path }}"
- name: copy alertmanager systemd config
template:

View file

@ -54,7 +54,7 @@
src: "{{ playbook_dir }}/{{ item.value.src }}"
dest: "{{ prometheus_rule_path }}/{{ item.value.dest }}"
validate: "{{ prometheus_daemon_dir }}/promtool check rules %s"
loop: '{{ prometheus_rule_files | dict2items | default({}) }}'
loop: '{{ prometheus_rule_files | default({}) | dict2items }}'
notify:
- restart prometheus