Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
## mkpasswd("password", "12345678") # 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 ## usage [plain_text] $pw = mkpasswd("test", "12345678") notify { $pw: } ## output [plain_text] notice: //Node[junglist]/Notify[$1$12345678$oEitTZYQtRHfNGmsFvTBA/]/message: is absent, should be $1$12345678$oEitTZYQtRHfNGmsFvTBA/
This paste will be private.
From the Design Piracy series on my blog: