Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

(#13860) Make a2enmod/a2dismo commands optional

Previous to this comit, the a2enmod and a2dismod commands were required
for the a2mod provider to be used by puppet on the first run.  Since
these commands are not always available on the first run, the catalog
application might fail.  This commit makes the commands optional, so the
provider's validity will be evaluated when an a2mod resource is enforced
  • Loading branch information...
commit a35ede51266d784e724564bcc8eb21d7d0ed8a68 1 parent 98d774e
@ccaum ccaum authored
Showing with 7 additions and 7 deletions.
  1. +7 −7 lib/puppet/provider/a2mod/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
Please sign in to comment.
Something went wrong with that request. Please try again.