This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'puppet/parser/functions' | |
module Puppet::Parser::Functions | |
newfunction(:pw_hash, :type => :rvalue, :doc => "Returns the hash of a password." | |
) do |args| | |
raise Puppet::ParseError, "pw_hash takes exactly two arguments," + | |
"#{args.length} provided" if args.length != 2 | |
pwd = args[0] | |
slt = args[1] |