Skip to content
This repository has been archived by the owner on Mar 6, 2023. It is now read-only.

Fix custom rule/target file copy #132

Merged
merged 1 commit into from
Jul 15, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file.
Empty file.
9 changes: 5 additions & 4 deletions tasks/configure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
- name: copy custom alerting rule files
copy:
src: "{{ item }}"
dest: "{{ prometheus_config_dir }}/rules/{{ item | splitext | difference(['.rules']) | join('') }}.rules"
dest: "{{ prometheus_config_dir }}/rules/"
owner: root
group: prometheus
mode: 0640
validate: "/usr/local/bin/promtool check rules %s"
with_fileglob:
- prometheus/rules/*
- prometheus/rules/*.rules
notify:
- reload prometheus

Expand Down Expand Up @@ -54,10 +54,11 @@
- name: copy prometheus custom static targets
copy:
src: "{{ item }}"
dest: "{{ prometheus_config_dir }}/file_sd/{{ item | splitext | difference(['.yml']) | join('') }}.yml"
dest: "{{ prometheus_config_dir }}/file_sd/"
force: true
owner: root
group: prometheus
mode: 0640
with_fileglob:
- prometheus/targets/*
- prometheus/targets/*.yml
- prometheus/targets/*.json