]> git.donarmstrong.com Git - dsa-puppet.git/blob - 3rdparty/modules/apache/manifests/mod/proxy_html.pp
add Openstack modules to 3rdparty
[dsa-puppet.git] / 3rdparty / modules / apache / manifests / mod / proxy_html.pp
1 class apache::mod::proxy_html {
2   Class['::apache::mod::proxy'] -> Class['::apache::mod::proxy_html']
3   Class['::apache::mod::proxy_http'] -> Class['::apache::mod::proxy_html']
4
5   # Add libxml2
6   case $::osfamily {
7     /RedHat|FreeBSD|Gentoo/: {
8       ::apache::mod { 'xml2enc': }
9       $loadfiles = undef
10     }
11     'Debian': {
12       $gnu_path = $::hardwaremodel ? {
13         'i686'  => 'i386',
14         default => $::hardwaremodel,
15       }
16       $loadfiles = $::apache::params::distrelease ? {
17         '6'     => ['/usr/lib/libxml2.so.2'],
18         '10'    => ['/usr/lib/libxml2.so.2'],
19         default => ["/usr/lib/${gnu_path}-linux-gnu/libxml2.so.2"],
20       }
21     }
22   }
23
24   ::apache::mod { 'proxy_html':
25     loadfiles => $loadfiles,
26   }
27
28   # Template uses $icons_path
29   file { 'proxy_html.conf':
30     ensure  => file,
31     path    => "${::apache::mod_dir}/proxy_html.conf",
32     content => template('apache/mod/proxy_html.conf.erb'),
33     require => Exec["mkdir ${::apache::mod_dir}"],
34     before  => File[$::apache::mod_dir],
35     notify  => Class['apache::service'],
36   }
37 }