From 16150c3dc066e853e4fa7a429c35c9d791d8771f Mon Sep 17 00:00:00 2001 From: paulfantom Date: Fri, 8 Dec 2017 22:37:56 +0100 Subject: [PATCH] simplify setting custom configuration file --- defaults/main.yml | 2 +- tasks/configure.yml | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 599554d7..313db456 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -45,7 +45,7 @@ prometheus_targets: [] prometheus_scrape_jobs: [] -prometheus_custom_config_path: '' +prometheus_config_file: 'prometheus.yml.j2' prometheus_alert_rules: - alert: InstanceDown diff --git a/tasks/configure.yml b/tasks/configure.yml index 52607181..773ed4b7 100644 --- a/tasks/configure.yml +++ b/tasks/configure.yml @@ -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