adds empty index.html

This commit is contained in:
Arne Teuke
2018-04-20 10:32:45 +02:00
parent e68298bc5c
commit 1c46f1634d
3 changed files with 19 additions and 0 deletions

View File

@@ -116,6 +116,8 @@ $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'
$ae_index_file = '/var/www/html/index.html'
$ae_index_erb = 'cd_apache/index_html.erb'
# includes must be last

View File

@@ -93,6 +93,23 @@ class cd_apache::server::files (
notify => Service['httpd'],
}
# manage index.html
file { $ae_index_file:
ensure => file,
path => $ae_index_file,
owner => $ae_user_name,
group => $ae_user_name,
mode => '0644',
selrange => s0,
selrole => object_r,
seltype => httpd_sys_content_t,
seluser => system_u,
content => template($ae_index_erb),
notify => Service['httpd'],
}
if $ae_allow_user_dirs == true {
# manage userdir.conf