first create config folders, then copy configs

This commit is contained in:
nd 2020-05-23 15:26:48 +02:00
parent 4fec7ab566
commit 9007ea71ec
No known key found for this signature in database
GPG key ID: 21B5CD4DEE3670E9

View file

@ -8,21 +8,6 @@
groups: ssl-cert groups: ssl-cert
append: yes 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 - name: create ssl certificate folder
file: file:
dest: /etc/prometheus/targetcerts/ dest: /etc/prometheus/targetcerts/
@ -44,6 +29,21 @@
- /etc/prometheus/conf.d/rule_files - /etc/prometheus/conf.d/rule_files
- /etc/prometheus/conf.d/alerting - /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 - name: add self scrape job
notify: regenerate prometheus config notify: regenerate prometheus config
template: template: