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

move filter-syslog to its own class

parent 25aa9367
Loading
Loading
Loading
Loading

README.md

0 → 100644
+23 −0
Original line number Diff line number Diff line
[[_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
+23 −0
Original line number Diff line number Diff line
# 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,
    }
  }

}
+2 −4
Original line number Diff line number Diff line
@@ -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',