lib/bolt/transport/base.rb
# Unwraps any Sensitive data in an arguments Hash, so the plain-text is passed
# to the Task/Script.
#
# This works on deeply nested data structures composed of Hashes, Arrays, and
# and plain-old data types (int, string, etc).
Unwraps any Sensitive data in an arguments Hash, so the plain-text is passed
to the Task/Script.

This works on deeply nested data structures composed of Hashes, Arrays, and
and plain-old data types (int, string, etc).
Unwraps any Sensitive data in an arguments Hash so the plain - text is passed to the Task / Script . This works on deeply nested data structures composed of Hashes Arrays and and plain - old data types ( int string etc ) .
def unwrap_sensitive_args(arguments)
        return arguments unless defined?(Puppet::Pops::Types::PSensitiveType::Sensitive)
        case arguments
        when Array
          arguments.map { |x| unwrap_sensitive_args(x) }
        when Hash
          arguments.each_with_object({}) { |(k, v), h|
            h[unwrap_sensitive_args(k)] = unwrap_sensitive_args(v)
          }
        when Puppet::Pops::Types::PSensitiveType::Sensitive
          unwrap_sensitive_args(arguments.unwrap)
        else
          arguments
        end
      end
def unwrap_sensitive_args ( arguments ) return arguments unless defined? ( Puppet :: Pops :: Types :: PSensitiveType :: Sensitive ) case arguments when Array arguments . map { | x | unwrap_sensitive_args ( x ) } when Hash arguments . each_with_object ( { } ) { | ( k , v ) , h | h [ unwrap_sensitive_args ( k ) ] = unwrap_sensitive_args ( v ) } when Puppet :: Pops :: Types :: PSensitiveType :: Sensitive unwrap_sensitive_args ( arguments . unwrap ) else arguments end end
Unwraps any Sensitive data in an arguments Hash, so the plain-text is passed
to the Task/Script.
Unwraps any Sensitive data in an arguments Hash so the plain - text is passed to the Task / Script .
# Skip this if Puppet isn't loaded # iterate over the array, unwrapping all elements # iterate over the arguments hash and unwrap all keys and values # this value is Sensitive, unwrap it # unknown data type, just return it
arguments
<not_specific>