first create config folders, then copy configs
This commit is contained in:
parent
4fec7ab566
commit
9007ea71ec
1 changed files with 15 additions and 15 deletions
|
|
@ -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:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue