28
|
1 |
class apache::mod::geoip ( |
|
2 |
$enable = false, |
|
3 |
$db_file = '/usr/share/GeoIP/GeoIP.dat', |
|
4 |
$flag = 'Standard', |
|
5 |
$output = 'All', |
|
6 |
$enable_utf8 = undef, |
|
7 |
$scan_proxy_headers = undef, |
|
8 |
$scan_proxy_header_field = undef, |
|
9 |
$use_last_xforwarededfor_ip = undef, |
|
10 |
) { |
|
11 |
::apache::mod { 'geoip': } |
|
12 |
|
|
13 |
# Template uses: |
|
14 |
# - enable |
|
15 |
# - db_file |
|
16 |
# - flag |
|
17 |
# - output |
|
18 |
# - enable_utf8 |
|
19 |
# - scan_proxy_headers |
|
20 |
# - scan_proxy_header_field |
|
21 |
# - use_last_xforwarededfor_ip |
|
22 |
file { 'geoip.conf': |
|
23 |
ensure => file, |
|
24 |
path => "${::apache::mod_dir}/geoip.conf", |
|
25 |
content => template('apache/mod/geoip.conf.erb'), |
|
26 |
require => Exec["mkdir ${::apache::mod_dir}"], |
|
27 |
before => File[$::apache::mod_dir], |
|
28 |
notify => Class['apache::service'], |
|
29 |
} |
|
30 |
|
|
31 |
} |