Commit e5d396ec authored by Jerome Charaoui's avatar Jerome Charaoui
Browse files

move SecDataDir stuff into base

parent ef505b94
......@@ -138,5 +138,18 @@ class mod_security::base {
}
# since version 2.5 we need to define a SecDataDir
file{'/var/www/modsecurity_data':
ensure => directory,
require => Package['mod_security'],
owner => apache, group => apache, mode => 0640;
}
file{"${config_dir}/sec_data_dir.conf":
content => "SecDataDir /var/www/modsecurity_data\n",
require => File['/var/www/modsecurity_data'],
notify => Service['apache'],
owner => root, group => 0, mode => 0644;
}
}
......@@ -9,17 +9,4 @@ class mod_security::centos inherits mod_security::base {
notify => Service['apache'],
owner => root, group => 0, mode => 0644;
}
# since version 2.5 we need to define a SecDataDir
file{'/var/www/modsecurity_data':
ensure => directory,
require => Package['mod_security'],
owner => apache, group => apache, mode => 0640;
}
file{"${config_dir}/sec_data_dir.conf":
content => "SecDataDir /var/www/modsecurity_data\n",
require => File['/var/www/modsecurity_data'],
notify => Service['apache'],
owner => root, group => 0, mode => 0644;
}
}
......@@ -7,17 +7,9 @@ class mod_security::debian inherits mod_security::base {
ensure => present,
content => 'include modsecurity.d/*.conf',
}
# since version 2.5 we need to define a SecDataDir
file{'/var/www/modsecurity_data':
ensure => directory,
require => Package['mod_security'],
owner => 'www-data', group => 'www-data', mode => 0640;
}
file{"${config_dir}/sec_data_dir.conf":
content => "SecDataDir /var/www/modsecurity_data\n",
require => File['/var/www/modsecurity_data'],
notify => Service['apache'],
owner => root, group => 0, mode => 0644;
File['/var/www/modsecurity_data'] {
owner => 'www-data',
group => 'www-data',
}
}
class mod_security::itk inherits mod_security {
class mod_security::itk inherits mod_security::base {
case $operatingsystem {
centos: { include mod_security::itk::centos }
default: { include mod_security::itk::base }
}
}
class mod_security::itk::centos inherits mod_security::centos {
class mod_security::itk::base inherits mod_security::base {
# this is a bit ugly but currently we can define the SecDir only globally
# see : https://www.modsecurity.org/tracker/browse/MODSEC-149
File['/var/www/modsecurity_data']{
mode => 0666,
}
......
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