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

Commit

Permalink
Merge pull request #21 from cloudalchemy/custom_config
Browse files Browse the repository at this point in the history
simplify setting custom configuration file
  • Loading branch information
paulfantom authored Dec 15, 2017
2 parents 8cd6678 + 16150c3 commit e0aa2b2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ prometheus_targets: []

prometheus_scrape_jobs: []

prometheus_custom_config_path: ''
prometheus_config_file: 'prometheus.yml.j2'

prometheus_alert_rules:
- alert: InstanceDown
Expand Down
7 changes: 1 addition & 6 deletions tasks/configure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,13 @@

- name: configure prometheus
template:
src: "{{ item }}"
src: "{{ prometheus_config_file }}"
dest: "{{ prometheus_config_dir }}/prometheus.yml"
force: yes
owner: prometheus
group: prometheus
mode: 0644
validate: "{{ prometheus_config_validator }}"
with_first_found:
- files:
- prometheus.yml.j2
paths:
- "{{ prometheus_custom_config_path }}"
notify:
- reload prometheus

Expand Down

0 comments on commit e0aa2b2

Please sign in to comment.