added all file controls

This commit is contained in:
Arne Teuke
2017-06-20 10:18:30 +01:00
parent b0b9a0a692
commit b2ad14d456
6 changed files with 77 additions and 18 deletions

View File

@@ -37,7 +37,7 @@ $ae_user_shell = '/bin/false',
# configuration files # configuration files
$ae_manage_cfg = false, $ae_manage_cfg = false,
$ae_manage_dirs = true, $ae_manage_dirs = true,
$ae_allow_user_dirs = false,
) { ) {
@@ -74,6 +74,9 @@ $ae_magic_file_erb = 'cd_apache/magic.erb'
$ae_ssl_file = "${ae_conf_d_dir}/ssl.conf" $ae_ssl_file = "${ae_conf_d_dir}/ssl.conf"
$ae_ssl_file_erb = 'cd_apache/ssl_conf.erb' $ae_ssl_file_erb = 'cd_apache/ssl_conf.erb'
$ae_autoindex_file = "${ae_conf_d_dir}/autoindex.conf" $ae_autoindex_file = "${ae_conf_d_dir}/autoindex.conf"
$ae_autoindex_erb = 'cd_apache/autoindex_conf.erb'
$ae_userdir_file = "${ae_conf_d_dir}/userdir.conf"
$ae_userdir_erb = 'cd_apache/userdir_conf.erb'
# includes must be last # includes must be last

View File

@@ -48,7 +48,7 @@ class cd_apache::server::files (
# manage magic file # manage magic file
file { $ae_magic_file: file { $ae_magic_file:
ensure => file, ensure => file,
path => $ae_magic_file, path => $ae_magic_file,
owner => 'root', owner => 'root',
@@ -64,7 +64,7 @@ class cd_apache::server::files (
# manage main ssl config file # manage main ssl config file
file { $ae_ssl_file: file { $ae_ssl_file:
ensure => file, ensure => file,
path => $ae_ssl_file, path => $ae_ssl_file,
owner => 'root', owner => 'root',
@@ -78,4 +78,39 @@ class cd_apache::server::files (
notify => Service['httpd'], notify => Service['httpd'],
} }
# manage autoindex.conf
file { $ae_autoindex_file:
ensure => file,
path => $ae_autoindex_file,
owner => 'root',
group => 'root',
mode => '0644',
selrange => s0,
selrole => object_r,
seltype => httpd_config_t,
seluser => system_u,
content => template($ae_autoindex_erb),
notify => Service['httpd'],
}
if $ae_allow_user_dirs == true {
# manage userdir.conf
file { $ae_userdir_file:
ensure => file,
path => $ae_userdir_file,
owner => 'root',
group => 'root',
mode => '0644',
selrange => s0,
selrole => object_r,
seltype => httpd_config_t,
seluser => system_u,
content => template($ae_userdir_erb),
notify => Service['httpd'],
}
}
}
} }

View File

@@ -1,4 +1,10 @@
# ################################################################################
## autoindex.conf generated by puppet - manual changed will be overwritten ##
################################################################################
########## full reference file is available under ###########
##### https://confdroid.com/2017/06/apache-autoindex-conf-v-2-4/ #####
################################################################################
# Directives controlling the display of server-generated directory listings. # Directives controlling the display of server-generated directory listings.
# #
# Required modules: mod_authz_core, mod_authz_host, # Required modules: mod_authz_core, mod_authz_host,
@@ -91,4 +97,3 @@ HeaderName HEADER.html
# and not include in the listing. Shell-style wildcarding is permitted. # and not include in the listing. Shell-style wildcarding is permitted.
# #
IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t

View File

@@ -1,3 +1,10 @@
################################################################################
## magic file generated by puppet - manual changed will be overwritten ##
################################################################################
########## full reference file is available under ###########
########## https://confdroid.com/2017/06/apache-magic-v-2-4/ ###########
################################################################################
# Magic data for mod_mime_magic Apache module (originally for file(1) command) # Magic data for mod_mime_magic Apache module (originally for file(1) command)
# The module is described in /manual/mod/mod_mime_magic.html # The module is described in /manual/mod/mod_mime_magic.html
# #
@@ -382,4 +389,3 @@
# from Apple quicktime file format documentation. # from Apple quicktime file format documentation.
4 string moov video/quicktime 4 string moov video/quicktime
4 string mdat video/quicktime 4 string mdat video/quicktime

View File

@@ -1,6 +1,10 @@
################################################################################ ################################################################################
##### ssl.conf generated by puppet - manual changed will be overwritten ##### ##### ssl.conf generated by puppet - manual changed will be overwritten #####
################################################################################ ################################################################################
########## full reference file is available under ###########
########## https://confdroid.com/2017/06/apache-ssl-conf-v-2-4/ ###########
################################################################################
# When we also provide SSL we have to listen to the # When we also provide SSL we have to listen to the
# the HTTPS port in addition. # the HTTPS port in addition.
# #

View File

@@ -1,3 +1,10 @@
################################################################################
## userdir.conf generated by puppet - manual changed will be overwritten ##
################################################################################
########## full reference file is available under ###########
##### https://confdroid.com/2017/06/apache-userdir-conf-v-2-4/ ###########
################################################################################
# #
# UserDir: The name of the directory that is appended onto a user's home # UserDir: The name of the directory that is appended onto a user's home
# directory if a ~user request is received. # directory if a ~user request is received.
@@ -33,4 +40,3 @@
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
Require method GET POST OPTIONS Require method GET POST OPTIONS
</Directory> </Directory>