Commit 2be185a1 authored by Adam Lewenberg's avatar Adam Lewenberg
Browse files

move filter-syslog to its own class

parent 25aa9367
[[_TOC_]]
# The su_apache Puppet module
## Overview
This Puppet module
* Installs Apache 2.4
* Opens up the iptables firewall to allow access to ports 80 and 443 from the entire internet
* Manages the Apache SSL security settings files
## Configuration
The `su_apache` module will install the filter-syslog file apropriate for
Apache. If you want do not want to install this file, set
`su-apache::filter_syslog` to `absent` in your Hiera file(s).
### Debian configuration
### RedHat configuration
# This class assumes that some _other_ class has already declared the
# '/etc/filter-syslog" file resource.
class su_apache::filter_syslog (
Enum['present', 'absent'] $ensure = 'present',
) {
if ($ensure == 'present') {
# PRESENT
# Default syslog filtering and iptables configuration.
file { '/etc/filter-syslog/apache':
ensure => present,
source => 'puppet:///modules/su_apache/etc/filter-syslog/apache',
require => File['/etc/filter-syslog'],
}
} else {
# ABSENT
file { '/etc/filter-syslog/apache':
ensure => absent,
}
}
}
......@@ -69,10 +69,8 @@ class su_apache (
'RedHat': { include su_apache::redhat }
}
# Default syslog filtering and iptables configuration.
file { '/etc/filter-syslog/apache':
source => 'puppet:///modules/su_apache/etc/filter-syslog/apache',
}
include su_apache::filter_syslog
base::iptables::rule { 'web':
description => 'Allow web accesses from anywhere',
protocol => 'tcp',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment