From 98d774eaa89fee1b60e30ada3bdcac6fc9f3778e Mon Sep 17 00:00:00 2001 From: Carl Caum Date: Tue, 10 Apr 2012 11:30:39 -0500 Subject: [PATCH] (#13860) Autorequire Package['httpd'] Previous to this commit, the `a2mod type did not autorequire the Package['httpd'] resource provided by the `apache` class. If the Package['httpd'] resource was enforced after any a2mod resources, the a2mod resources would fail since the httpd package installs the a2emod/a2dismod system commands. --- lib/puppet/type/a2mod.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/puppet/type/a2mod.rb b/lib/puppet/type/a2mod.rb index 0a1c8eb..617e4fc 100644 --- a/lib/puppet/type/a2mod.rb +++ b/lib/puppet/type/a2mod.rb @@ -1,6 +1,6 @@ Puppet::Type.newtype(:a2mod) do @doc = "Manage Apache 2 modules on Debian and Ubuntu" - + ensurable newparam(:name) do @@ -8,5 +8,9 @@ Puppet::Type.newtype(:a2mod) do isnamevar - end + end + + autorequire(:package) { catalog.resource(:package, 'httpd')} + + end end