OP#409 initial commit after fork

This commit is contained in:
12ww1160
2026-02-03 00:41:35 +01:00
parent 3fe5000d8e
commit 526aed6b88
27 changed files with 256 additions and 221 deletions

View File

@@ -1,11 +1,11 @@
## cd_apache::firewall::iptables.pp
# Module name: cd_apache
# Author: Arne Teuke (arne_teuke@ConfDroid.com)
## confdroid_apache::firewall::iptables.pp
# Module name: confdroid_apache
# Author: 12ww1160 (12ww1160@ConfDroid.com)
# @summary manage firewall settings through cd_firewall or puppetlabs-firewall
###############################################################################
class cd_apache::firewall::iptables (
class confdroid_apache::firewall::iptables (
) inherits cd_apache::params {
) inherits confdroid_apache::params {
if $ae_manage_fw == true {
firewall { "${ae_order_no}${ae_http_port} tcp http port ${ae_http_port}":
proto => ['tcp','udp'],

View File

@@ -1,8 +1,8 @@
## cd_apache::init.pp
# Module name: cd_apache
# Author: Arne Teuke (arne_teuke@confdroid.com)
# @summary initializes the cd_apache Puppet module.
## confdroid_apache::init.pp
# Module name: confdroid_apache
# Author: 12ww1160 (12ww1160@confdroid.com)
# @summary initializes the confdroid_apache Puppet module.
##############################################################################
class cd_apache {
include cd_apache::params
class confdroid_apache {
include confdroid_apache::params
}

View File

@@ -1,11 +1,11 @@
## cd_apache::main::config.pp
# Module name: cd_apache
# Author: Arne Teuke (arne_teuke@confdroid.com)
## confdroid_apache::main::config.pp
# Module name: confdroid_apache
# Author: 12ww1160 (12ww1160@confdroid.com)
# @summary configure the module classes to be used.
##############################################################################
class cd_apache::main::config (
class confdroid_apache::main::config (
) inherits cd_apache::params {
include cd_apache::server::service
include cd_apache::monitoring::target
) inherits confdroid_apache::params {
include confdroid_apache::server::service
include confdroid_apache::monitoring::target
}

View File

@@ -1,11 +1,11 @@
## cd_apache::monitoring::target.pp
# Module name: cd_apache
# Author: Arne Teuke (arne_teuke@puppetsoft.com)
## confdroid_apache::monitoring::target.pp
# Module name: confdroid_apache
# Author: 12ww1160 (12ww1160@puppetsoft.com)
# @summary class manages exports for nagios monitoring
##############################################################################
class cd_apache::monitoring::target (
class confdroid_apache::monitoring::target (
) inherits cd_apache::params {
) inherits confdroid_apache::params {
case $ae_incl_target {
false: { notify { 'Nagios Service target for check_httpd has been disabled via parameters / ENC override': }
}

View File

@@ -1,7 +1,7 @@
## cd_apache::params.pp
# Module name: cd_apache
# Author: Arne Teuke (arne_teuke@confdroid.com)
# @summary This class holds all parameters for the cd_apache module, which are
## confdroid_apache::params.pp
# Module name: confdroid_apache
# Author: 12ww1160 (12ww1160@confdroid.com)
# @summary This class holds all parameters for the confdroid_apache module, which are
# inherited by all classes except defines.
# @param [String] pkg_ensure Specify which
# [package type] (https://confdroid.com/2017/05/puppet-type-package/)
@@ -29,7 +29,7 @@
# configuration. httpd is very often a sub system used by many other services,
# and the required configuration depends on the use case. If using httpd as
# sub-service ( i.e. for phpmyadmin, Nagios etc.), the main configuration
# should be done on that end, not in cd_apache. IN that case, set `ae_manage_cfg`
# should be done on that end, not in confdroid_apache. IN that case, set `ae_manage_cfg`
# to `false`.
# @param [Boolean] ae_manage_dirs Whether or not main directories required
# to run httpd should be managed. Typically this should be set to true.
@@ -44,7 +44,7 @@
# @param [Boolean] ae_manage_fw whether to manage firewall settings
# @param [String] reqpackages List of packages to install.
###########################################################################
class cd_apache::params (
class confdroid_apache::params (
# installation
String $pkg_ensure = 'latest',
@@ -95,18 +95,18 @@ class cd_apache::params (
# files
$ae_conf_file = "${ae_conf_dir}/httpd.conf"
$ae_conf_file_erb = 'cd_apache/httpd_conf.erb'
$ae_conf_file_erb = 'confdroid_apache/httpd_conf.erb'
$ae_magic_file = "${ae_conf_dir}/magic"
$ae_magic_file_erb = 'cd_apache/magic.erb'
$ae_magic_file_erb = 'confdroid_apache/magic.erb'
$ae_ssl_file = "${ae_conf_d_dir}/ssl.conf"
$ae_ssl_file_erb = 'cd_apache/ssl_conf.erb'
$ae_ssl_file_erb = 'confdroid_apache/ssl_conf.erb'
$ae_autoindex_file = "${ae_conf_d_dir}/autoindex.conf"
$ae_autoindex_erb = 'cd_apache/autoindex_conf.erb'
$ae_autoindex_erb = 'confdroid_apache/autoindex_conf.erb'
$ae_userdir_file = "${ae_conf_d_dir}/userdir.conf"
$ae_userdir_erb = 'cd_apache/userdir_conf.erb'
$ae_userdir_erb = 'confdroid_apache/userdir_conf.erb'
$ae_index_file = '/var/www/html/index.html'
$ae_index_erb = 'cd_apache/index_html.erb'
$ae_index_erb = 'confdroid_apache/index_html.erb'
# includes must be last
include cd_apache::main::config
include confdroid_apache::main::config
}

View File

@@ -1,13 +1,13 @@
## cd_apache::server::dirs.pp
# Module name: cd_apache
# Author: Arne Teuke (arne_teuke@confdroid.com)
## confdroid_apache::server::dirs.pp
# Module name: confdroid_apache
# Author: 12ww1160 (12ww1160@confdroid.com)
# @summary Manage all aspects of the directory structure required for the
# httpd service.
##############################################################################
class cd_apache::server::dirs (
class confdroid_apache::server::dirs (
) inherits cd_apache::params {
require cd_apache::server::user
) inherits confdroid_apache::params {
require confdroid_apache::server::user
if $ae_manage_dirs == true {
# create main dir

View File

@@ -1,12 +1,12 @@
## cd_apache::server::files.pp
# Module name: cd_apache
# Author: Arne Teuke (arne_teuke@confdroid.com)
## confdroid_apache::server::files.pp
# Module name: confdroid_apache
# Author: 12ww1160 (12ww1160@confdroid.com)
# @summary Manage all aspects for the httpd configuration, if enabled.
##############################################################################
class cd_apache::server::files (
class confdroid_apache::server::files (
) inherits cd_apache::params {
require cd_apache::server::dirs
) inherits confdroid_apache::params {
require confdroid_apache::server::dirs
if $ae_manage_cfg == true {
# manage main config file

View File

@@ -1,11 +1,11 @@
## cd_apache::server::install.pp
# Module name: cd_apache
# Author: Arne Teuke (arne_teuke@confdroid.com)
## confdroid_apache::server::install.pp
# Module name: confdroid_apache
# Author: 12ww1160 (12ww1160@confdroid.com)
# @summary Install required binaries
##############################################################################
class cd_apache::server::install (
class confdroid_apache::server::install (
) inherits cd_apache::params {
) inherits confdroid_apache::params {
require cd_resources
package { $reqpackages:

View File

@@ -1,13 +1,13 @@
## cd_apache::server::service.pp
# Module name: cd_apache
# Author: Arne Teuke (arne_teuke@confdroid.com)
## confdroid_apache::server::service.pp
# Module name: confdroid_apache
# Author: 12ww1160 (12ww1160@confdroid.com)
# @summary manage the httpd service.
##############################################################################
class cd_apache::server::service (
class confdroid_apache::server::service (
) inherits cd_apache::params {
require cd_apache::server::files
require cd_apache::firewall::iptables
) inherits confdroid_apache::params {
require confdroid_apache::server::files
require confdroid_apache::firewall::iptables
service { $ae_service:
ensure => running,

View File

@@ -1,12 +1,12 @@
## cd_apache::server:;user.pp
# Module name: cd_apache
# Author: Arne Teuke (arne_teuke@confdroid.com)
## confdroid_apache::server:;user.pp
# Module name: confdroid_apache
# Author: 12ww1160 (12ww1160@confdroid.com)
# @summary manage all aspects of the httpd service user, if enabled
##############################################################################
class cd_apache::server::user (
class confdroid_apache::server::user (
) inherits cd_apache::params {
require cd_apache::server::install
) inherits confdroid_apache::params {
require confdroid_apache::server::install
if $ae_manage_user == true {
group { $ae_user_name: