Defined Type: apache::security::rule_link

Defined in:
manifests/security/rule_link.pp

Summary

Links the activated_rules from `apache::mod::security` to the respective CRS rules on disk.

Overview



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'manifests/security/rule_link.pp', line 5

define apache::security::rule_link {
  $parts = split($title, '/')
  $filename = $parts[-1]

  $target = $title ? {
    /^\//   => $title,
    default => "${apache::params::modsec_crs_path}/${title}",
  }

  file { $filename:
    ensure  => 'link',
    path    => "${apache::mod::security::modsec_dir}/activated_rules/${filename}",
    target  => $target ,
    require => File["${apache::mod::security::modsec_dir}/activated_rules"],
    notify  => Class['apache::service'],
  }
}