move configuration before systemd

This commit is contained in:
Ludovic Cartier 2021-10-29 18:23:10 +02:00
parent 31d2f33ae0
commit cce16b3e98
3 changed files with 34 additions and 34 deletions

View File

@ -43,6 +43,16 @@
when:
- prometheus_mongodb_exporter_latest_version.stdout > '0.2'
- name: 'prometheus | mongodb exporter | configuration'
template:
src: conf/prometheus-mongodb-exporter.j2
dest: /etc/default/prometheus-mongodb-exporter
owner: root
group: root
mode: 0600
notify:
- 'prometheus | mongodb exporter | restart service'
- name: 'prometheus | mongodb exporter | install unit file to systemd'
template:
src: systemd/prometheus-mongodb-exporter.service.j2
@ -58,13 +68,3 @@
daemon_reload: yes
enabled: yes
name: prometheus-mongodb-exporter.service
- name: 'prometheus | mongodb exporter | configuration'
template:
src: conf/prometheus-mongodb-exporter.j2
dest: /etc/default/prometheus-mongodb-exporter
owner: root
group: root
mode: 0600
notify:
- 'prometheus | mongodb exporter | restart service'

View File

@ -28,6 +28,19 @@
notify:
- 'prometheus | mysqld exporter | restart service'
- name: 'prometheus | mysqld exporter | configuration'
template:
src: conf/prometheus-mysqld-exporter.j2
dest: /etc/default/prometheus-mysqld-exporter
owner: root
group: root
mode: 0600
when:
- prometheus_mysqld_exporter_user is defined
register: prometheus_mysqld_exporter_configuration
notify:
- 'prometheus | mysqld exporter | restart service'
- name: 'prometheus | mysqld exporter | install unit file to systemd'
template:
src: systemd/prometheus-mysqld-exporter.service.j2
@ -41,16 +54,3 @@
daemon_reload: yes
enabled: yes
name: prometheus-mysqld-exporter.service
- name: 'prometheus | mysqld exporter | configuration'
template:
src: conf/prometheus-mysqld-exporter.j2
dest: /etc/default/prometheus-mysqld-exporter
owner: root
group: root
mode: 0600
when:
- prometheus_mysqld_exporter_user is defined
register: prometheus_mysqld_exporter_configuration
notify:
- 'prometheus | mysqld exporter | restart service'

View File

@ -28,6 +28,17 @@
notify:
- 'prometheus | postgres exporter | restart service'
- name: 'prometheus | postgres exporter | configuration'
template:
src: conf/prometheus-postgres-exporter.j2
dest: /etc/default/prometheus-postgres-exporter
owner: root
group: root
mode: 0600
register: prometheu_postgres_exporter_configuration
notify:
- 'prometheus | postgres exporter | restart service'
- name: 'prometheus | postgres exporter | install unit file to systemd'
template:
src: systemd/prometheus-postgres-exporter.service.j2
@ -42,14 +53,3 @@
enabled: yes
state: started
name: prometheus-postgres-exporter.service
- name: 'prometheus | postgres exporter | configuration'
template:
src: conf/prometheus-postgres-exporter.j2
dest: /etc/default/prometheus-postgres-exporter
owner: root
group: root
mode: 0600
register: prometheu_postgres_exporter_configuration
notify:
- 'prometheus | postgres exporter | restart service'