Files
confdroid_apache/manifests/server/files.pp

111 lines
2.7 KiB
ObjectPascal
Raw Normal View History

2017-06-19 13:34:42 +01:00
## cd_apache::server::files.pp
# Module name: cd_apache
# Author: Arne Teuke (arne_teuke@confdroid.com)
# @summary Manage all aspects for the httpd configuration, if enabled.
2017-06-19 13:34:42 +01:00
##############################################################################
class cd_apache::server::files (
) inherits cd_apache::params {
require cd_apache::server::dirs
2017-06-19 17:06:32 +01:00
if $ae_manage_cfg == true {
# manage main config file
file { $ae_conf_file:
ensure => file,
path => $ae_conf_file,
owner => 'root',
group => 'root',
mode => '0644',
selrange => s0,
selrole => object_r,
seltype => httpd_config_t,
seluser => system_u,
content => template($ae_conf_file_erb),
notify => Service['httpd'],
2017-06-19 17:06:32 +01:00
}
# manage magic file
file { $ae_magic_file:
ensure => file,
path => $ae_magic_file,
owner => 'root',
group => 'root',
mode => '0644',
selrange => s0,
selrole => object_r,
seltype => httpd_config_t,
seluser => system_u,
content => template($ae_magic_file_erb),
notify => Service['httpd'],
2017-06-19 17:06:32 +01:00
}
# manage main ssl config file
file { $ae_ssl_file:
ensure => file,
path => $ae_ssl_file,
owner => 'root',
group => 'root',
mode => '0644',
selrange => s0,
selrole => object_r,
seltype => httpd_config_t,
seluser => system_u,
content => template($ae_ssl_file_erb),
notify => Service['httpd'],
}
2017-06-19 15:33:27 +01:00
2017-06-20 10:18:30 +01:00
# 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'],
}
2017-06-20 10:18:30 +01:00
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'],
2017-06-20 10:18:30 +01:00
}
}
}
2018-04-20 11:41:13 +02:00
# 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'],
2018-04-20 11:41:13 +02:00
}
2017-06-19 13:34:42 +01:00
}