From 4bb3edc19f4c15c1c27696dfa3d04e6ac8c13512 Mon Sep 17 00:00:00 2001 From: Ludovic Cartier Date: Tue, 31 Dec 2024 16:13:31 +0100 Subject: [PATCH] add handlers & some minors corrections --- handlers/main.yml | 5 +++++ tasks/main.yml | 6 ------ 2 files changed, 5 insertions(+), 6 deletions(-) create mode 100644 handlers/main.yml diff --git a/handlers/main.yml b/handlers/main.yml new file mode 100644 index 0000000..1de49d8 --- /dev/null +++ b/handlers/main.yml @@ -0,0 +1,5 @@ +--- +- name: restart nagios-nrpe-server + systemd_service: + name: nagios-nrpe-server + state: restarted diff --git a/tasks/main.yml b/tasks/main.yml index 844cac4..d4842c2 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -7,7 +7,6 @@ - name: nrpe | install nrpe packages apt: name: "{{ item }}" - update_cache: true state: present with_items: - nagios-nrpe-server @@ -33,11 +32,6 @@ dest: /usr/lib/nagios/plugins mode: 0755 -- name: nrpe | restart nagios-nrpe-server - systemd: - state: restarted - name: nagios-nrpe-server - - name: nrpe | allow nagios user to specific sudo template: src: nrpe.sudoers.j2