Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge remote branch 'upstream/master'

  • Loading branch information...
commit 933f8cfaa466b47b49c0738d60e079b0cc94294a 2 parents ca0a1e2 + 789d8d3
@antoncohen authored
Showing with 13 additions and 9 deletions.
  1. +7 −7 lib/puppet/provider/a2mod/a2mod.rb
  2. +6 −2 lib/puppet/type/a2mod.rb
View
14 lib/puppet/provider/a2mod/a2mod.rb
@@ -1,21 +1,21 @@
Puppet::Type.type(:a2mod).provide(:a2mod) do
desc "Manage Apache 2 modules on Debian and Ubuntu"
-
- commands :encmd => "a2enmod"
- commands :discmd => "a2dismod"
-
+
+ optional_commands :encmd => "a2enmod"
+ optional_commands :discmd => "a2dismod"
+
defaultfor :operatingsystem => [:debian, :ubuntu]
def create
encmd resource[:name]
end
-
+
def destroy
discmd resource[:name]
end
-
+
def exists?
- mod= "/etc/apache2/mods-enabled/" + resource[:name] + ".load"
+ mod= "/etc/apache2/mods-enabled/" + resource[:name] + ".load"
File.exists?(mod)
end
end
View
8 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 @@
isnamevar
- end
+ end
+
+ autorequire(:package) { catalog.resource(:package, 'httpd')}
+
+ end
end
Please sign in to comment.
Something went wrong with that request. Please try again.