diff options
Diffstat (limited to 'plugins/puppet/parser/functions')
-rw-r--r-- | plugins/puppet/parser/functions/mkpasswd.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/plugins/puppet/parser/functions/mkpasswd.rb b/plugins/puppet/parser/functions/mkpasswd.rb new file mode 100644 index 0000000..645df9b --- /dev/null +++ b/plugins/puppet/parser/functions/mkpasswd.rb @@ -0,0 +1,6 @@ +# 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 |