Puppet Function: decrypt

Defined in:
lib/puppet/parser/functions/decrypt.rb
Function type:
Ruby 3.x API

Overview

decrypt()Any

Returns:

  • (Any)


4
5
6
7
8
9
10
11
12
13
14
# File 'lib/puppet/parser/functions/decrypt.rb', line 4

newfunction(:decrypt, :type => :rvalue) do |args|
  options = {}
  decrypt_args = {}
  if args[0].is_a? String
    decrypt_args['value'] = args[0]
  else
    decrypt_args = args[0]
    puts "Using hash: #{decrypt_args}"
  end
  Puppet::Decrypt::Decryptor.new(options).decrypt_hash(decrypt_args)
end