Created
August 30, 2019 10:33
-
-
Save tuxmea/3d67c86c88c3505cfebe05002d98eb54 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @@ -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