main #31
|
@ -2,3 +2,7 @@
|
||||||
service:
|
service:
|
||||||
name: nagios-nrpe-server
|
name: nagios-nrpe-server
|
||||||
state: restarted
|
state: restarted
|
||||||
|
- name: restart-sysctl
|
||||||
|
service:
|
||||||
|
name: systemd-sysctl
|
||||||
|
state: restarted
|
||||||
|
|
|
@ -1,31 +1,4 @@
|
||||||
- name: Set NRPE PVE configuration
|
- import_tasks: nrpe.yml
|
||||||
copy:
|
tags: nrpe
|
||||||
src: nrpe.cfg
|
- import_tasks: vhost.yml
|
||||||
dest: /etc/nagios/nrpe.d/95-pve.cfg
|
tags: vhost
|
||||||
owner: root
|
|
||||||
group: root
|
|
||||||
mode: u=rw,g=r,o=r
|
|
||||||
notify: restart-nrpe
|
|
||||||
- name: Copy PVE NRPE plugins
|
|
||||||
copy:
|
|
||||||
src: nrpe/
|
|
||||||
dest: /etc/nagios/plugins/
|
|
||||||
owner: root
|
|
||||||
group: root
|
|
||||||
mode: u=rwx,g=rx,o=rx
|
|
||||||
notify: restart-nrpe
|
|
||||||
- name: Add nagios to sudoers
|
|
||||||
copy:
|
|
||||||
src: sudoers
|
|
||||||
dest: /etc/sudoers.d/nagios
|
|
||||||
mode: u=rw,g=r,o=
|
|
||||||
owner: root
|
|
||||||
group: root
|
|
||||||
notify: restart-nrpe
|
|
||||||
- name: Configure memory regions
|
|
||||||
copy:
|
|
||||||
src: vhost.conf
|
|
||||||
dest: /etc/modprobe.d/
|
|
||||||
mode: u=rw,g=r,o=r
|
|
||||||
owner: root
|
|
||||||
group: root
|
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
- name: Set NRPE PVE configuration
|
||||||
|
copy:
|
||||||
|
src: nrpe.cfg
|
||||||
|
dest: /etc/nagios/nrpe.d/95-pve.cfg
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: u=rw,g=r,o=r
|
||||||
|
notify: restart-nrpe
|
||||||
|
- name: Copy PVE NRPE plugins
|
||||||
|
copy:
|
||||||
|
src: nrpe/
|
||||||
|
dest: /etc/nagios/plugins/
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: u=rwx,g=rx,o=rx
|
||||||
|
notify: restart-nrpe
|
||||||
|
- name: Add nagios to sudoers
|
||||||
|
copy:
|
||||||
|
src: sudoers
|
||||||
|
dest: /etc/sudoers.d/nagios
|
||||||
|
mode: u=rw,g=r,o=
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
notify: restart-nrpe
|
|
@ -0,0 +1,8 @@
|
||||||
|
- name: Configure memory regions
|
||||||
|
copy:
|
||||||
|
src: vhost.conf
|
||||||
|
dest: /etc/modprobe.d/
|
||||||
|
mode: u=rw,g=r,o=r
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
notify: restart-sysctl
|
Loading…
Reference in New Issue