diff --git a/tasks/exporter/blackbox.yml b/tasks/exporter/blackbox.yml index a90843c..f4a86ec 100644 --- a/tasks/exporter/blackbox.yml +++ b/tasks/exporter/blackbox.yml @@ -46,10 +46,11 @@ owner: root group: root mode: 0600 + notify: + - 'prometheus | blackbox exporter | restart service' - name: 'prometheus | blackbox exporter | configure systemd to use service' systemd: daemon_reload: yes enabled: yes name: prometheus-blackbox-exporter.service - diff --git a/tasks/exporter/memcached.yml b/tasks/exporter/memcached.yml index f6041eb..dd1d2c2 100644 --- a/tasks/exporter/memcached.yml +++ b/tasks/exporter/memcached.yml @@ -25,6 +25,8 @@ owner: root group: root mode: 0755 + notify: + - 'prometheus | memcached exporter | restart service' - name: 'prometheus | memcached exporter | install unit file to systemd' template: diff --git a/tasks/exporter/opcache.yml b/tasks/exporter/opcache.yml index 4572b26..e9d3223 100644 --- a/tasks/exporter/opcache.yml +++ b/tasks/exporter/opcache.yml @@ -19,6 +19,8 @@ owner: root group: root mode: 0755 + notify: + - 'prometheus | opcache exporter | restart service' - name: 'prometheus | opcache exporter | configuration' template: @@ -28,6 +30,8 @@ group: root mode: 0600 register: prometheus_opcache_exporter_configuration + notify: + - 'prometheus | opcache exporter | restart service' - name: 'prometheus | opcache exporter | install unit file to systemd' template: diff --git a/tasks/exporter/phpfpm.yml b/tasks/exporter/phpfpm.yml index ec30865..bf378dd 100644 --- a/tasks/exporter/phpfpm.yml +++ b/tasks/exporter/phpfpm.yml @@ -35,6 +35,8 @@ owner: root group: root mode: 0600 + notify: + - 'prometheus | phpfpm exporter | restart service' - name: 'prometheus | phpfpm exporter | install unit file to systemd' template: diff --git a/tasks/exporter/redis.yml b/tasks/exporter/redis.yml index 67bf668..9d49d3f 100644 --- a/tasks/exporter/redis.yml +++ b/tasks/exporter/redis.yml @@ -26,14 +26,6 @@ group: root mode: 0755 -- name: 'prometheus | redis exporter | install unit file to systemd' - template: - src: systemd/prometheus-redis-exporter.service.j2 - dest: /etc/systemd/system/prometheus-redis-exporter.service - owner: root - group: root - mode: 0600 - - name: 'prometheus | redis exporter | configuration' template: src: conf/prometheus-redis-exporter.j2 @@ -45,6 +37,14 @@ notify: - 'prometheus | redis exporter | restart service' +- name: 'prometheus | redis exporter | install unit file to systemd' + template: + src: systemd/prometheus-redis-exporter.service.j2 + dest: /etc/systemd/system/prometheus-redis-exporter.service + owner: root + group: root + mode: 0600 + - name: 'prometheus | redis exporter | configure systemd to use service' systemd: daemon_reload: yes