libraries/passwords.rb
# Library routine that returns an encrypted data bag value
# for a supplied string. The key used in decrypting the
# encrypted value should be located at
# node['slurm']['secret']['key_path'].
#
Library routine that returns an encrypted data bag value
for a supplied string.
Library routine that returns an encrypted data bag value for a supplied string .
def encrypted_secret(bag_name, index)
    key_path = node['slurm']['secret']['key_path']
    ::Chef::Log.info "Loading encrypted databag #{bag_name}.#{index} using key at #{key_path}"
    secret = ::Chef::EncryptedDataBagItem.load_secret key_path 
    ::Chef::EncryptedDataBagItem.load(bag_name, index, secret)[index] 
  end
def encrypted_secret ( bag_name , index ) key_path = node [ 'slurm' ] [ 'secret' ] [ 'key_path' ] :: Chef :: Log . info "Loading encrypted databag #{bag_name}.#{index} using key at #{key_path}" secret = :: Chef :: EncryptedDataBagItem . load_secret key_path :: Chef :: EncryptedDataBagItem . load ( bag_name , index , secret ) [ index ] end
Library routine that returns an encrypted data bag value
for a supplied string.
Library routine that returns an encrypted data bag value for a supplied string .
# ~FC086 # ~FC086
bag_name
index