From 9007ea71ec37eb17a86942f568d77ffb7b953204 Mon Sep 17 00:00:00 2001 From: nd Date: Sat, 23 May 2020 15:26:48 +0200 Subject: [PATCH] first create config folders, then copy configs --- tasks/main.yml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index 062a1e6..36e9e7c 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -8,21 +8,6 @@ groups: ssl-cert append: yes -- name: wrtie prometheus config - notify: restart prometheus - template: - src: prometheus.j2 - dest: /etc/default/prometheus - -- name: wrtie prometheus (base) config - notify: regenerate prometheus config - copy: - owner: root - group: root - mode: 0644 - dest: /etc/prometheus/conf.d/prometheus.conf - content: "{{ prometheus.config|to_nice_yaml(indent=2) }}" - - name: create ssl certificate folder file: dest: /etc/prometheus/targetcerts/ @@ -44,6 +29,21 @@ - /etc/prometheus/conf.d/rule_files - /etc/prometheus/conf.d/alerting +- name: wrtie prometheus config + notify: restart prometheus + template: + src: prometheus.j2 + dest: /etc/default/prometheus + +- name: wrtie prometheus (base) config + notify: regenerate prometheus config + copy: + owner: root + group: root + mode: 0644 + dest: /etc/prometheus/conf.d/prometheus.conf + content: "{{ prometheus.config|to_nice_yaml(indent=2) }}" + - name: add self scrape job notify: regenerate prometheus config template: