]> gitweb.fluxo.info Git - puppet-stdlib.git/commitdiff
validate_augeas: requires augeas
authorRaphaël Pinson <raphael.pinson@camptocamp.com>
Fri, 18 Jan 2013 20:59:47 +0000 (21:59 +0100)
committerRaphaël Pinson <raphael.pinson@camptocamp.com>
Fri, 18 Jan 2013 21:02:13 +0000 (22:02 +0100)
lib/puppet/parser/functions/validate_augeas.rb

index a40711835b49b1153e5b4ced8c1645206f197465..d66e3403e55ada96b9577a3bd8a863ee8fded5a7 100644 (file)
@@ -28,6 +28,10 @@ module Puppet::Parser::Functions
         validate_augeas($sudoerscontent, 'Sudoers.lns', [], 'Failed to validate sudoers content with Augeas')
 
     ENDHEREDOC
+    unless Puppet.features.augeas?
+      raise Puppet::ParseError, ("validate_augeas(): requires the ruby augeas bindings")
+    end
+
     if (args.length < 2) or (args.length > 4) then
       raise Puppet::ParseError, ("validate_augeas(): wrong number of arguments (#{args.length}; must be 2, 3, or 4)")
     end