From 1c46f1634da0b5aff98d8385d324a8e236f5ca5f Mon Sep 17 00:00:00 2001 From: Arne Teuke Date: Fri, 20 Apr 2018 10:32:45 +0200 Subject: [PATCH] adds empty index.html --- manifests/params.pp | 2 ++ manifests/server/files.pp | 17 +++++++++++++++++ templates/index_html.erb | 0 3 files changed, 19 insertions(+) create mode 100644 templates/index_html.erb diff --git a/manifests/params.pp b/manifests/params.pp index 62ea1c6..4f38534 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -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 diff --git a/manifests/server/files.pp b/manifests/server/files.pp index e8cd667..d2915cb 100644 --- a/manifests/server/files.pp +++ b/manifests/server/files.pp @@ -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 diff --git a/templates/index_html.erb b/templates/index_html.erb new file mode 100644 index 0000000..e69de29