lib/foreman_provision/configuration.rb
# Method to load credentials form a YAML file
# @param [String] file
# @return [Hash]
Method to load credentials form a YAML file
Method to load credentials form a YAML file
def load_credentials(file)
      if File.file?(file)
        credentials = YAML.load_file(file)
      else
        raise("Unable to load file \"#{file}\" in #{__method__}")
      end
      raise(TypeError) unless credentials.is_a?(Hash)
      @logger.debug("loaded credentials from file \"#{file}\": \"#{credentials}\" in #{__method__} ")
      credentials
    end
def load_credentials ( file ) if File . file? ( file ) credentials = YAML . load_file ( file ) else raise ( "Unable to load file \"#{file}\" in #{__method__}" ) end raise ( TypeError ) unless credentials . is_a? ( Hash ) @logger . debug ( "loaded credentials from file \"#{file}\": \"#{credentials}\" in #{__method__} " ) credentials end
Method to load credentials form a YAML file
Method to load credentials form a YAML file
None
Hash
file
<not_specific>
<not_specific>
None