NRPE selinux policy.
This commit is contained in:
parent
e106a24f23
commit
8acd523425
4 changed files with 24 additions and 1 deletions
BIN
roles/nagios_client/files/selinux/fi-nrpe.mod
Normal file
BIN
roles/nagios_client/files/selinux/fi-nrpe.mod
Normal file
Binary file not shown.
BIN
roles/nagios_client/files/selinux/fi-nrpe.pp
Normal file
BIN
roles/nagios_client/files/selinux/fi-nrpe.pp
Normal file
Binary file not shown.
11
roles/nagios_client/files/selinux/fi-nrpe.te
Normal file
11
roles/nagios_client/files/selinux/fi-nrpe.te
Normal file
|
@ -0,0 +1,11 @@
|
|||
module fi-nrpe 1.0;
|
||||
|
||||
require {
|
||||
type nagios_system_plugin_t;
|
||||
type nrpe_exec_t;
|
||||
class file getattr;
|
||||
}
|
||||
|
||||
#============= nagios_system_plugin_t ==============
|
||||
allow nagios_system_plugin_t nrpe_exec_t:file getattr;
|
||||
|
|
@ -43,8 +43,20 @@
|
|||
# skvidal 2013-05-21
|
||||
|
||||
|
||||
# FIXME? figure out nrpe selinux policy of DOOM is needed
|
||||
# Three tasks for handling our custom selinux module
|
||||
- name: ensure a directory exists for our custom selinux module
|
||||
file: dest=/usr/share/nrpe state=directory
|
||||
|
||||
- name: copy over our custom selinux module
|
||||
copy: src=selinux/fi-nrpe.pp dest=/usr/share/nrpe/fi-nrpe.pp
|
||||
register: selinux_module
|
||||
|
||||
- name: install our custom selinux module
|
||||
command: semodule -i /usr/share/nrpe/fi-nrpe.pp
|
||||
when: selinux_module|changed
|
||||
|
||||
|
||||
# Set up our base config.
|
||||
- name: /etc/nagios/nrpe.cfg
|
||||
template: src=nrpe.cfg.j2 dest=/etc/nagios/nrpe.cfg
|
||||
notify:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue