adds eec to import policy

This commit is contained in:
Arne Teuke
2019-04-23 21:21:54 +02:00
parent 580770e284
commit 22585b6da9
2 changed files with 10 additions and 7 deletions

View File

@@ -28,16 +28,18 @@ class cd_nrpe::main::exec (
# create policy file fpr sudo selinux policy
exec { 'create_nrpe_pp':
command => template($ne_checkmodule_nrpe_erb),
user => 'root',
creates => $ne_nrpe_pp_file,
command => template($ne_checkmodule_nrpe_erb),
user => 'root',
creates => $ne_nrpe_pp_file,
refreshonly => true,
notify => Exec['import_semodule_nrpe'],
}
# 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_',
command => template($ne_semodule_erb),
user => 'root',
unless => '/sbin/semodule -l | grep nrpe | grep -v nrpe_',
refreshonly => true,
}
}

View File

@@ -85,6 +85,7 @@ class cd_nrpe::main::files (
seltype => nrpe_etc_t,
seluser => system_u,
content => template($ne_nrpe_te_erb),
notify => Exec['create_nrpe_pp'],
}
}
}