Compare commits

10 Commits

Author SHA1 Message Date
167d56d32a remove notification 2026-03-09 12:22:17 +01:00
c1be1108f9 OP#459 push to gitea 2026-02-24 17:58:17 +01:00
06f1db823b set fw to true 2026-02-14 20:15:41 +01:00
16f534b5d2 add badge 2026-02-06 16:28:03 +01:00
08c263d34c OP#414 update gitea url 2026-02-06 16:20:30 +01:00
f5e8c5b5c8 OP#414 update Readme 2026-02-06 15:39:21 +01:00
80e629bc5c fix sonar name 2026-02-04 09:45:53 +01:00
Arne Teuke
77572efa1a OP#410 lint 2026-02-03 16:25:18 +01:00
Arne Teuke
c1333f711d OP#410 update README for GA release 2026-02-03 16:12:02 +01:00
Arne Teuke
e6efa11010 OP#410 update README for GA release 2026-02-03 16:06:43 +01:00
7 changed files with 44 additions and 54 deletions

1
.gitignore vendored
View File

@@ -3,3 +3,4 @@ Gemfile.lock
FileList FileList
.scannerwork .scannerwork
.vscode .vscode
.puppet-lint.rc

View File

@@ -1,6 +0,0 @@
{
"cSpell.words": [
"phpmyadmin",
"userdir"
]
}

4
Jenkinsfile vendored
View File

@@ -69,7 +69,7 @@ pipeline {
withCredentials([string(credentialsId: 'sonar-token', variable: 'SONAR_TOKEN')]) { withCredentials([string(credentialsId: 'sonar-token', variable: 'SONAR_TOKEN')]) {
sh ''' sh '''
/opt/sonar-scanner/bin/sonar-scanner \ /opt/sonar-scanner/bin/sonar-scanner \
-Dsonar.projectKey=cconfdroid_apache \ -Dsonar.projectKey=confdroid_apache \
-Dsonar.sources=. \ -Dsonar.sources=. \
-Dsonar.host.url=https://sonarqube.confdroid.com \ -Dsonar.host.url=https://sonarqube.confdroid.com \
-Dsonar.token=$SONAR_TOKEN -Dsonar.token=$SONAR_TOKEN
@@ -114,7 +114,7 @@ pipeline {
git rm -f Jenkinsfile git rm -f Jenkinsfile
git rm -r --cached .vscode || echo "No .vscode to remove from git" git rm -r --cached .vscode || echo "No .vscode to remove from git"
git commit --amend --no-edit --allow-empty git commit --amend --no-edit --allow-empty
git remote add master https://gitea.confdroid.com/confdroid/confdroid_apache.git git remote add master https://sourcecode.confdroid.com/confdroid/confdroid_apache.git
git -c credential.helper="!f() { echo username=${GITEA_USER}; echo password=${GITEA_TOKEN}; }; f" \ git -c credential.helper="!f() { echo username=${GITEA_USER}; echo password=${GITEA_TOKEN}; }; f" \
push master --mirror push master --mirror
''' '''

View File

@@ -1,6 +1,8 @@
# README # README
[![Build Status](https://jenkins.confdroid.com/buildStatus/icon?job=confdroid_apache)](https://jenkins.confdroid.com/job/confdroid_apache/) [![Build Status](https://jenkins.confdroid.com/buildStatus/icon?job=confdroid_apache)](https://jenkins.confdroid.com/job/confdroid_apache/)
[![Security Hotspots](https://sonarqube.confdroid.com/api/project_badges/measure?project=confdroid_apache&metric=security_hotspots&token=sqb_783a19acf8d97e87e5c570981a8e9019d40c4654)](https://sonarqube.confdroid.com/dashboard?id=confdroid_apache)
[![Quality gate](https://sonarqube.confdroid.com/api/project_badges/quality_gate?project=confdroid_apache&token=sqb_783a19acf8d97e87e5c570981a8e9019d40c4654)](https://sonarqube.confdroid.com/dashboard?id=confdroid_apache)
- [README](#readme) - [README](#readme)
- [Synopsis](#synopsis) - [Synopsis](#synopsis)
@@ -16,7 +18,6 @@
- [Contact Us](#contact-us) - [Contact Us](#contact-us)
- [Disclaimer](#disclaimer) - [Disclaimer](#disclaimer)
## Synopsis ## Synopsis
`Apache httpd` is a very powerful and widely used web server. `Apache httpd` is a very powerful and widely used web server.
@@ -25,47 +26,45 @@
## WARNING ## WARNING
***Attention: Never use this puppet module on systems which have been previously configured manually. It is impossible to predict how and what would have been configured, hence previous configurations outside the scope of this module may be overwritten! Automated configurations require a test environment to verify that the module suits the purpose intended by the user, as well as tune the parameters, before deploying into live production*** ---Attention: Never use this puppet module on systems which have been previously configured manually. It is impossible to predict how and what would have been configured, hence previous configurations outside the scope of this module may be overwritten! Automated configurations require a test environment to verify that the module suits the purpose intended by the user, as well as tune the parameters, before deploying into live production---
## Features ## Features
Installation Installation
* install required binaries and dependencies - install required binaries and dependencies
Configuration Configuration
* manage directory structure (optional) - manage directory structure (optional)
* manage configuration files (optional): - manage configuration files (optional):
* file system permissions - file system permissions
* selinux context - selinux context
* manage firewall settings (optional) - manage firewall settings (optional)
* manage nagios monitoring (optional) - manage nagios monitoring (optional)
Maintenance Maintenance
* manage the service - manage the service
### vHosts ### vHosts
As stated in the synopsis, this module was written particularly for usage as base module. `Apache httpd` has a great number of use cases where it actually is not used directly as full-blown web server by itself, but instead as platform for other applications. Examples here would be: As stated in the synopsis, this module was written particularly for usage as base module. `Apache httpd` has a great number of use cases where it actually is not used directly as full-blown web server by itself, but instead as platform for other applications. Examples here would be:
* front-end proxy for other applications to avoid having to put the port number into the URL - front-end proxy for other applications to avoid having to put the port number into the URL
* applications like phpMyAdmin, phpPgAdmin - applications like phpMyAdmin, phpPgAdmin
* WordPress - WordPress
* Nagios etc. - Nagios etc.
With those use cases, you would provide the vHosts at the Puppet module for the application, not the base module. Also, if you plan to use this module to run a plain fully fledged web server, you would use a role- or profile class/module on top of `confdroid_apache` to set up your vHost exactly as needed. Examples for regular basic vHost configuration files are included in the examples directory as parameterized .erb files. You would create a define for vHosts, i.e. using the example parameters, and simply add `confdroid_apache` as requirement (i.e. require confdroid_apache) so it gets installed automatically. With those use cases, you would provide the vHosts at the Puppet module for the application, not the base module. Also, if you plan to use this module to run a plain fully fledged web server, you would use a role- or profile class/module on top of `confdroid_apache` to set up your vHost exactly as needed. Examples for regular basic vHost configuration files are included in the examples directory as parameterized .erb files. You would create a define for vHosts, i.e. using the example parameters, and simply add `confdroid_apache` as requirement (i.e. require confdroid_apache) so it gets installed automatically.
### Dependencies ### Dependencies
All dependencies must be included in the catalogue. All listed dependencies must be included in the catalogue.
* [cd_resources](https://gitlab.confdroid.com/puppet/cd_resources) for managing yum repo resources.
## Deployment ## Deployment
* native Puppet deployment - native Puppet deployment
via site.pp or nodes.pp via site.pp or nodes.pp
@@ -75,9 +74,9 @@ node 'example.example.net' {
} }
``` ```
* through Foreman: - through Foreman:
In order to apply parameters through Foreman, **__confdroid_apache::params__** must be added to the host or host group in question. In order to apply parameters through Foreman, --__confdroid_apache::params__-- must be added to the host or host group in question.
See [more details about class deployment on Confdroid.com](https://confdroid.com/2017/05/deploying-our-puppet-modules/). See [more details about class deployment on Confdroid.com](https://confdroid.com/2017/05/deploying-our-puppet-modules/).
@@ -91,16 +90,16 @@ All files and directories are configured with correct selinux context. If selinu
## Support ## Support
* OS: Rocky 9 - OS: Rocky 9
* Puppet 8 - Puppet 8
## Tests ## Tests
* Puppet Lint - Puppet Lint
* Puppet Parser - Puppet Parser
* ERB Template Parser - ERB Template Parser
* Test for unwanted UTF8 files in the Puppet code (see tests/UTF_Files) - Test for unwanted UTF8 files in the Puppet code (see tests/UTF_Files)
* Sonar Quality Gate - Sonar Quality Gate
## Contact Us ## Contact Us

View File

@@ -6,10 +6,7 @@
class confdroid_apache::monitoring::target ( class confdroid_apache::monitoring::target (
) inherits confdroid_apache::params { ) inherits confdroid_apache::params {
case $ae_incl_target { if $ae_incl_target == true {
false: { notify { 'Nagios Service target for check_httpd has been disabled via parameters / ENC override': }
}
default: {
@@nagios_service { "check_http_${fqdn}": @@nagios_service { "check_http_${fqdn}":
check_command => 'check_http', check_command => 'check_http',
use => 'generic-service', use => 'generic-service',
@@ -24,4 +21,3 @@ class confdroid_apache::monitoring::target (
} }
} }
} }
}

View File

@@ -59,7 +59,7 @@ class confdroid_apache::params (
String $ae_target_service = '/etc/nagios/conf.d/httpd_service.cfg', String $ae_target_service = '/etc/nagios/conf.d/httpd_service.cfg',
# firewall # firewall
Boolean $ae_manage_fw = false, Boolean $ae_manage_fw = true,
String $ae_order_no = '50', String $ae_order_no = '50',
String $ae_http_port = '80', String $ae_http_port = '80',
String $ae_https_port = '443', String $ae_https_port = '443',