added checknagios selinux exception

This commit is contained in:
Arne Teuke
2017-07-30 16:00:13 +01:00
parent cf807acd56
commit fc05564e89
3 changed files with 21 additions and 0 deletions

View File

@@ -938,6 +938,7 @@ $ng_htpasswd_rule = 'cd_nagios/nagios/htpasswd_rule.erb'
$ng_taccgi_erb = 'cd_nagios/selinux/taccgi.erb'
$ng_statcgi_erb = 'cd_nagios/selinux/statuscgi.erb'
$ng_checknrpe_erb = 'cd_nagios/selinux/checknrpe.erb'
$ng_checknagios_erb = 'cd_nagios/selinux/checknagios.erb'
$ng_nagios_conf = '/etc/httpd/conf.d/nagios.conf'
$ng_nagios_conf_erb = 'cd_nagios/httpd/nagios_conf.erb'
$ng_welcome_conf = '/etc/httpd/conf.d/welcome.conf'

View File

@@ -93,6 +93,25 @@ class cd_nagios::selinux::config (
notify => Service[$ng_service],
}
# selart check_nagios
exec { 'create_policy_checknagios':
command => template($ng_checknagios_erb),
path => ['/usr/bin','/usr/sbin'],
cwd => $ng_user_home,
creates => "${ng_user_home}/my-checknagios.pp",
notify => Exec['semodule_checknagios'],
}
exec { 'semodule_checknagios':
command => 'semodule -i my-checknagios.pp',
path => ['/usr/bin','/usr/sbin'],
cwd => $ng_user_home,
require => Exec['create_policy_checknagios'],
refreshonly => true,
notify => Service[$ng_service],
}
}
}