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