Also, allow them to be placed elsewhere in the filesystem and make it possible to exclude a key from the named configuration.
10 lines
215 B
Ruby
10 lines
215 B
Ruby
# ex: syntax=ruby si sw=2 ts=2 et
|
|
require 'securerandom'
|
|
|
|
module Puppet::Parser::Functions
|
|
newfunction(:hmac_secret, :type => :rvalue) do |args|
|
|
bits = args[0].to_i
|
|
SecureRandom.base64(bits / 8)
|
|
end
|
|
end
|