From 78ce39c746f2ba0b8f47804146c37dacc7eda281 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Sun, 30 May 2021 14:26:05 +0200 Subject: [PATCH] fix: fix version install constraint --- tasks/setup.yml | 2 +- templates/conf/prometheus.yml.j2 | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tasks/setup.yml b/tasks/setup.yml index 74ae8a4..4ebac3b 100644 --- a/tasks/setup.yml +++ b/tasks/setup.yml @@ -33,9 +33,9 @@ - prometheus-{{ prometheus_version }}.linux-amd64/NOTICE - prometheus-{{ prometheus_version }}.linux-amd64/prometheus.yml notify: __prometheus_restart + when: prometheus_version is version(prometheus_current_version, ">") or prometheus_current_version is version('0.0.0', "=") become: True become_user: "{{ prometheus_user }}" - when: prometheus_version is version(prometheus_current_version, ">") or prometheus_current_version is version('0.0.0', "=") - block: - name: Copy prometheus config file diff --git a/templates/conf/prometheus.yml.j2 b/templates/conf/prometheus.yml.j2 index 1be1e02..fb7d1a8 100644 --- a/templates/conf/prometheus.yml.j2 +++ b/templates/conf/prometheus.yml.j2 @@ -22,12 +22,12 @@ rule_files: alerting: alertmanagers: - {{ prometheus_alertmanager_config | to_nice_yaml(indent=2) | indent(2,False) }} + {{ prometheus_alertmanager_config | to_nice_yaml(indent=2) | indent(2, False) }} {% if prometheus_alert_relabel_configs | length > 0 %} alert_relabel_configs: - {{ prometheus_alert_relabel_configs | to_nice_yaml(indent=2) | indent(2,False) }} + {{ prometheus_alert_relabel_configs | to_nice_yaml(indent=2) | indent(2, False) }} {% endif %} {% endif %} scrape_configs: - {{ prometheus_scrape_configs | to_nice_yaml(indent=2) | indent(2,False) }} + {{ prometheus_scrape_configs | to_nice_yaml(indent=2) | indent(2, False) }}