From 9591502e3cf3436f189a234c07f6b40eb22c826f Mon Sep 17 00:00:00 2001 From: Sheppy Date: Wed, 28 Dec 2022 19:57:46 +0100 Subject: [PATCH] feat: add icinga restart handler --- roles/monitoring-master/handlers/main.yml | 4 ++++ roles/monitoring-master/tasks/main.yaml | 4 ++++ 2 files changed, 8 insertions(+) create mode 100644 roles/monitoring-master/handlers/main.yml diff --git a/roles/monitoring-master/handlers/main.yml b/roles/monitoring-master/handlers/main.yml new file mode 100644 index 0000000..cf88ca5 --- /dev/null +++ b/roles/monitoring-master/handlers/main.yml @@ -0,0 +1,4 @@ +- name: restart icinga + systemd: + name: icinga2 + state: restarted diff --git a/roles/monitoring-master/tasks/main.yaml b/roles/monitoring-master/tasks/main.yaml index e70c2af..554e461 100644 --- a/roles/monitoring-master/tasks/main.yaml +++ b/roles/monitoring-master/tasks/main.yaml @@ -53,8 +53,12 @@ - services_passive.conf - services_passive_mail_extern.conf - services_async.conf + notify: + - restart icinga - name: Signal command loaded from monitoring tools lineinfile: path: /etc/icinga2/icinga2.conf line: "include monitoring-tools/commands.d/signal-notify.conf" + notify: + - restart icinga