From a743ce09fb29fbfe9436f6384135abd95a69de14 Mon Sep 17 00:00:00 2001 From: Jeltz Date: Thu, 1 Apr 2021 09:42:31 +0200 Subject: [PATCH] Move templates of the prometheus_federate role --- roles/prometheus_federate/tasks/main.yml | 16 ++++++---------- .../{prometheus => }/alert.rules.yml.j2 | 0 .../templates/{prometheus => }/prometheus.yml.j2 | 0 3 files changed, 6 insertions(+), 10 deletions(-) rename roles/prometheus_federate/templates/{prometheus => }/alert.rules.yml.j2 (100%) rename roles/prometheus_federate/templates/{prometheus => }/prometheus.yml.j2 (100%) diff --git a/roles/prometheus_federate/tasks/main.yml b/roles/prometheus_federate/tasks/main.yml index 73ae803..c5d81bf 100644 --- a/roles/prometheus_federate/tasks/main.yml +++ b/roles/prometheus_federate/tasks/main.yml @@ -10,19 +10,15 @@ - name: Configure Prometheus template: - src: prometheus/prometheus.yml.j2 - dest: /etc/prometheus/prometheus.yml - mode: 0644 - notify: Restart Prometheus - -- name: Configure Prometheus alert rules - template: - src: "prometheus/{{ item }}.j2" + src: "{{ item }}.j2" dest: "/etc/prometheus/{{ item }}" - mode: 0644 - notify: Restart Prometheus + owner: root + group: root + mode: u=r,g=r,o= loop: + - prometheus.yml - alert.rules.yml + notify: Restart Prometheus # We don't need to restart Prometheus when updating nodes - name: Configure Prometheus Federate devices diff --git a/roles/prometheus_federate/templates/prometheus/alert.rules.yml.j2 b/roles/prometheus_federate/templates/alert.rules.yml.j2 similarity index 100% rename from roles/prometheus_federate/templates/prometheus/alert.rules.yml.j2 rename to roles/prometheus_federate/templates/alert.rules.yml.j2 diff --git a/roles/prometheus_federate/templates/prometheus/prometheus.yml.j2 b/roles/prometheus_federate/templates/prometheus.yml.j2 similarity index 100% rename from roles/prometheus_federate/templates/prometheus/prometheus.yml.j2 rename to roles/prometheus_federate/templates/prometheus.yml.j2