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: