[prometheus-nginx-exporter] Wait for network to be up to start the exporter

linter
_shirenn 2022-05-24 21:46:50 +02:00
parent 75b6008738
commit f9e1ed4a81
3 changed files with 17 additions and 0 deletions

View File

@ -8,3 +8,7 @@
service:
name: prometheus-nginx-exporter
state: restarted
- name: systemctl daemon-reload
systemd:
daemon_reload: true

View File

@ -31,3 +31,14 @@
dest: /etc/nginx/sites-enabled/status
state: link
notify: Restart nginx
- name: Create /etc/systemd/system/prometheus-nginx-exporter.service.d/
file:
path: /etc/systemd/system/prometheus-nginx-exporter.service.d/
state: directory
- name: Patch prometheus-nginx-exporter service
template:
src: systemd/system/prometheus-nginx-exporter.service.d/override.conf.j2
dest: /etc/systemd/system/prometheus-nginx-exporter.service.d/override.conf
notify: systemctl daemon-reload