Skip to content

Instantly share code, notes, and snippets.

@tuxmea
Created August 30, 2019 10:33
Show Gist options
  • Select an option

  • Save tuxmea/3d67c86c88c3505cfebe05002d98eb54 to your computer and use it in GitHub Desktop.

Select an option

Save tuxmea/3d67c86c88c3505cfebe05002d98eb54 to your computer and use it in GitHub Desktop.
@@ -157,11 +156,11 @@ class apache::mod::security (
# - secrequestbodylimit
# - secrequestbodynofileslimit
# - secrequestbodyinmemorylimit
- file { 'security.conf':
+ file { 'security2.conf':
ensure => file,
content => template('apache/mod/security.conf.erb'),
mode => $::apache::file_mode,
- path => "${::apache::mod_dir}/security.conf",
+ path => "${::apache::mod_dir}/security2.conf",
owner => $::apache::params::user,
group => $::apache::params::group,
require => Exec["mkdir ${::apache::mod_dir}"],
@@ -212,10 +211,9 @@ class apache::mod::security (
require => File[$modsec_dir],
notify => Class['apache::service'],
}
+ # Debian 9 has a different rule setup
+ unless $::operatingsystem == 'SLES' or ($::operatingsystem == 'Debian' and versioncmp($::operatingsystemrelease, '9') >= 0) or ($::operatingsystem == 'Ubuntu' and versioncmp($::operatingsystemrelease, '18.04') >= 0) {
+ apache::security::rule_link { $activated_rules: }
+ }
}
- # Debian 9 has a different rule setup
- unless $::operatingsystem == 'SLES' or ($::operatingsystem == 'Debian' and versioncmp($::operatingsystemrelease, '9') >= 0) or ($::operatingsystem == 'Ubuntu' and versioncmp($::operatingsystemrelease, '18.04') >= 0) {
- apache::security::rule_link { $activated_rules: }
- }
-}
+}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment