added control for welcome.conf

This commit is contained in:
Arne Teuke
2017-07-21 14:05:55 +01:00
parent 5d12bf4437
commit 46d3b02f76
3 changed files with 72 additions and 24 deletions

View File

@@ -309,7 +309,7 @@ $ng_use_selinux_tools = true,
# httpd
$ng_required_hosts = '',
$ng_required_ips = '127.0.0.0/8',
$ng_disable_welcome = true,
) {
# installation section
@@ -352,6 +352,8 @@ $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_erb = 'cd_nagios/httpd/welcome_conf.erb'
# includes must be last

View File

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

View File

@@ -0,0 +1,27 @@
################################################################################
########### welcome.conf generated by Puppet ##########
########### manual changes will be overwritten !!! ##########
################################################################################
#
# This configuration file enables the default "Welcome" page if there
# is no default index page present for the root URL. To disable the
# Welcome page, comment out all the lines below.
#
# NOTE: if this file is removed, it will be restored on upgrades.
#
#<LocationMatch "^/+$">
# Options -Indexes
# ErrorDocument 403 /.noindex.html
#</LocationMatch>
#<Directory /usr/share/httpd/noindex>
# AllowOverride None
# Require all granted
#</Directory>
#Alias /.noindex.html /usr/share/httpd/noindex/index.html
#Alias /noindex/css/bootstrap.min.css /usr/share/httpd/noindex/css/bootstrap.min.css
#Alias /noindex/css/open-sans.css /usr/share/httpd/noindex/css/open-sans.css
#Alias /images/apache_pb.gif /usr/share/httpd/noindex/images/apache_pb.gif
#Alias /images/poweredby.png /usr/share/httpd/noindex/images/poweredby.png