Give bind::key the ability to generate keys
Also, allow them to be placed elsewhere in the filesystem and make it possible to exclude a key from the named configuration.
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
# 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
|
||||
Reference in New Issue
Block a user