diff --git a/manifests/mod/proxy_html.pp b/manifests/mod/proxy_html.pp
index cceaf0b755..f4f4b44111 100644
--- a/manifests/mod/proxy_html.pp
+++ b/manifests/mod/proxy_html.pp
@@ -19,6 +19,9 @@
'10' => ['/usr/lib/libxml2.so.2'],
default => ["/usr/lib/${gnu_path}-linux-gnu/libxml2.so.2"],
}
+ if versioncmp($::apache::apache_version, '2.4') >= 0 {
+ ::apache::mod { 'xml2enc': }
+ }
}
}
diff --git a/spec/classes/mod/proxy_html_spec.rb b/spec/classes/mod/proxy_html_spec.rb
index 066ae239a0..0d70276c26 100644
--- a/spec/classes/mod/proxy_html_spec.rb
+++ b/spec/classes/mod/proxy_html_spec.rb
@@ -32,9 +32,29 @@
context "on squeeze" do
let(:facts) { super().merge({ :operatingsystemrelease => '6' }) }
it_behaves_like "debian", ['/usr/lib/libxml2.so.2']
+ it { is_expected.to_not contain_apache__mod('xml2enc') }
end
context "on wheezy" do
let(:facts) { super().merge({ :operatingsystemrelease => '7' }) }
+ it { is_expected.to_not contain_apache__mod('xml2enc') }
+ context "i386" do
+ let(:facts) { super().merge({
+ :hardwaremodel => 'i686',
+ :architecture => 'i386'
+ })}
+ it_behaves_like "debian", ["/usr/lib/i386-linux-gnu/libxml2.so.2"]
+ end
+ context "x64" do
+ let(:facts) { super().merge({
+ :hardwaremodel => 'x86_64',
+ :architecture => 'amd64'
+ })}
+ it_behaves_like "debian", ["/usr/lib/x86_64-linux-gnu/libxml2.so.2"]
+ end
+ end
+ context "on jessie" do
+ let(:facts) { super().merge({ :operatingsystemrelease => '8' }) }
+ it { is_expected.to contain_apache__mod('xml2enc').with(:loadfiles => nil) }
context "i386" do
let(:facts) { super().merge({
:hardwaremodel => 'i686',
@@ -67,6 +87,7 @@
it { is_expected.to contain_class("apache::params") }
it { is_expected.to contain_apache__mod('proxy_html').with(:loadfiles => nil) }
it { is_expected.to contain_package("mod_proxy_html") }
+ it { is_expected.to contain_apache__mod('xml2enc').with(:loadfiles => nil) }
end
context "on a FreeBSD OS", :compile do
let :facts do
@@ -83,6 +104,7 @@
end
it { is_expected.to contain_class("apache::params") }
it { is_expected.to contain_apache__mod('proxy_html').with(:loadfiles => nil) }
+ it { is_expected.to contain_apache__mod('xml2enc').with(:loadfiles => nil) }
it { is_expected.to contain_package("www/mod_proxy_html") }
end
context "on a Gentoo OS", :compile do
@@ -100,6 +122,7 @@
end
it { is_expected.to contain_class("apache::params") }
it { is_expected.to contain_apache__mod('proxy_html').with(:loadfiles => nil) }
+ it { is_expected.to contain_apache__mod('xml2enc').with(:loadfiles => nil) }
it { is_expected.to contain_package("www-apache/mod_proxy_html") }
end
end