added control for forward.conf

This commit is contained in:
Arne Teuke
2017-07-21 14:43:07 +01:00
parent 46d3b02f76
commit d9863d874f
5 changed files with 41 additions and 4 deletions

View File

@@ -199,6 +199,9 @@
# 'host1.example.com host2.example.com'
# @param [string] ng_required_ips string of **__Ip addresses __** for hosts which
# should be allowed/reqired. Requires format 'ipaddress ip address range'
# @param [boolean] ng_disable_welcome Whether the regular welcome screen should
# be disabled. this is required for the nagios http check on the nagios server
# to be successful.
###############################################################################
class cd_nagios::params (
@@ -310,6 +313,7 @@ $ng_use_selinux_tools = true,
$ng_required_hosts = '',
$ng_required_ips = '127.0.0.0/8',
$ng_disable_welcome = true,
) {
# installation section
@@ -352,8 +356,11 @@ $ng_taccgi_erb = 'cd_nagios/selinux/taccgi.erb'
$ng_statcgi_erb = 'cd_nagios/selinux/statuscgi.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'
$ng_welcome_conf = '/etc/httpd/conf.d/welcome.conf'
$ng_welcome_conf_erb = 'cd_nagios/httpd/welcome_conf.erb'
$ng_forward_conf = '/etc/httpd/conf.d/nagios_forward.conf'
$ng_forward_conf_erb = 'cd_nagios/httpd/forward_conf.erb'
# includes must be last

View File

@@ -63,7 +63,24 @@ class cd_nagios::server::files (
notify => Service[$ae_service],
}
# manage index.gtml for nagios web server
if $ng_http_https_fw == true {
file { $ng_forward_conf:
ensure => file,
path => $ng_forward_conf,
owner => 'root',
group => 'root',
mode => '0644',
selrange => s0,
selrole => object_r,
seltype => httpd_config_t,
seluser => system_u,
content => template($ng_forward_conf_erb),
notify => Service[$ae_service],
}
}
# manage welcome.conf for nagios web server
if $ng_disable_welcome == true {