module-user/lib/puppet/parser/functions/mkpasswd.rb

7 lines
189 B
Ruby
Raw Normal View History

2008-12-05 15:44:27 +01:00
# needs an 8-char salt *always*
module Puppet::Parser::Functions
newfunction(:mkpasswd, :type => :rvalue) do |args|
%x{/usr/bin/mkpasswd -H MD5 #{args[0]} #{args[1]}}.chomp
end
end