adds eec to import policy

This commit is contained in:
Arne Teuke
2019-04-23 21:09:04 +02:00
parent d5fc289840
commit 97446c0679
4 changed files with 10 additions and 1 deletions

View File

@@ -30,4 +30,12 @@ class cd_nrpe::main::exec (
user => 'root', user => 'root',
creates => $ne_nrpe_pp_file, creates => $ne_nrpe_pp_file,
} }
# import semodule
exec { 'import_semodule_nrpe':
command => template($ne_semodule_erb),
user => 'root',
require => Exec['create_nrpe_pp'],
unless => '/sbin/semodule -l | grep nrpe | grep -v nrpe_',
}
} }

View File

@@ -181,6 +181,7 @@ $ne_nrpe_te_erb = 'cd_nrpe/nrpe.te.erb'
$ne_nrpe_mod_file = "${ne_main_conf_d_dir}/nrpe.mod" $ne_nrpe_mod_file = "${ne_main_conf_d_dir}/nrpe.mod"
$ne_checkmodule_nrpe_erb = 'cd_nrpe/checkmodule_nrpe.erb' $ne_checkmodule_nrpe_erb = 'cd_nrpe/checkmodule_nrpe.erb'
$ne_nrpe_pp_file = "${ne_main_conf_d_dir}/nrpe.pp" $ne_nrpe_pp_file = "${ne_main_conf_d_dir}/nrpe.pp"
$ne_semodule_erb = 'cd_nrpe/semodule_nrpe.erb'
# includes must be last # includes must be last

View File

@@ -1,3 +1,2 @@
/bin/checkmodule -M -m -o <%= @ne_nrpe_mod_file %> <%= @ne_nrpe_te_file %> /bin/checkmodule -M -m -o <%= @ne_nrpe_mod_file %> <%= @ne_nrpe_te_file %>
/bin/semodule_package -o <%= @ne_nrpe_pp_file %> -m <%= @ne_nrpe_mod_file %> /bin/semodule_package -o <%= @ne_nrpe_pp_file %> -m <%= @ne_nrpe_mod_file %>
/bin/semodule -i <%= @ne_nrpe_pp_file %>

View File

@@ -0,0 +1 @@
/sbin/semodule -i <%= @ne_nrpe_pp_file %>