added selinux policy for checknrpe

This commit is contained in:
Arne Teuke
2017-07-30 15:40:07 +01:00
parent 4154041de6
commit cf807acd56
3 changed files with 24 additions and 3 deletions

View File

@@ -73,5 +73,26 @@ class cd_nagios::selinux::config (
refreshonly => true,
notify => Service[$ng_service],
}
# sealert check_nrpe
exec { 'create_policy_checknrpe':
command => template($ng_checknrpe_erb),
path => ['/usr/bin','/usr/sbin'],
cwd => $ng_user_home,
creates => "${ng_user_home}/my-checknrpe.pp",
notify => Exec['semodule_checknrpe'],
}
exec { 'semodule_checknrpe':
command => 'semodule -i my-checknrpe.pp',
path => ['/usr/bin','/usr/sbin'],
cwd => $ng_user_home,
require => Exec['create_policy_checknrpe'],
refreshonly => true,
notify => Service[$ng_service],
}
}
}