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