]> git.donarmstrong.com Git - dsa-puppet.git/blobdiff - 3rdparty/modules/apache/manifests/mod/proxy_html.pp
try again, with puppetforge modules, correctly included now
[dsa-puppet.git] / 3rdparty / modules / apache / manifests / mod / proxy_html.pp
diff --git a/3rdparty/modules/apache/manifests/mod/proxy_html.pp b/3rdparty/modules/apache/manifests/mod/proxy_html.pp
new file mode 100644 (file)
index 0000000..8b910c2
--- /dev/null
@@ -0,0 +1,37 @@
+class apache::mod::proxy_html {
+  Class['::apache::mod::proxy'] -> Class['::apache::mod::proxy_html']
+  Class['::apache::mod::proxy_http'] -> Class['::apache::mod::proxy_html']
+
+  # Add libxml2
+  case $::osfamily {
+    /RedHat|FreeBSD|Gentoo/: {
+      ::apache::mod { 'xml2enc': }
+      $loadfiles = undef
+    }
+    'Debian': {
+      $gnu_path = $::hardwaremodel ? {
+        'i686'  => 'i386',
+        default => $::hardwaremodel,
+      }
+      $loadfiles = $::apache::params::distrelease ? {
+        '6'     => ['/usr/lib/libxml2.so.2'],
+        '10'    => ['/usr/lib/libxml2.so.2'],
+        default => ["/usr/lib/${gnu_path}-linux-gnu/libxml2.so.2"],
+      }
+    }
+  }
+
+  ::apache::mod { 'proxy_html':
+    loadfiles => $loadfiles,
+  }
+
+  # Template uses $icons_path
+  file { 'proxy_html.conf':
+    ensure  => file,
+    path    => "${::apache::mod_dir}/proxy_html.conf",
+    content => template('apache/mod/proxy_html.conf.erb'),
+    require => Exec["mkdir ${::apache::mod_dir}"],
+    before  => File[$::apache::mod_dir],
+    notify  => Class['apache::service'],
+  }
+}