adjust Parameter types, Jenkinsfile and Readme
This commit is contained in:
@@ -1,132 +1,110 @@
|
||||
## cd_apache::server::files.pp
|
||||
# Module name: cd_apache
|
||||
# Author: Arne Teuke (arne_teuke@confdroid.com)
|
||||
# License:
|
||||
# This file is part of cd_apache.
|
||||
#
|
||||
# cd_apache is used for providing automatic configuration of
|
||||
# Apache Webserver.
|
||||
# Copyright (C) 2014 confdroid (copyright@confdroid.com)
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# @summary Manage all aspects for the httpd configuration, if enabled.
|
||||
##############################################################################
|
||||
class cd_apache::server::files (
|
||||
|
||||
) inherits cd_apache::params {
|
||||
|
||||
require cd_apache::server::dirs
|
||||
|
||||
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'],
|
||||
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'],
|
||||
}
|
||||
|
||||
# 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'],
|
||||
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'],
|
||||
}
|
||||
|
||||
# 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'],
|
||||
}
|
||||
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'],
|
||||
}
|
||||
|
||||
# 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'],
|
||||
}
|
||||
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
|
||||
|
||||
# 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'],
|
||||
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'],
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# manage index.html
|
||||
# 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'],
|
||||
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'],
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user