module ChefConfig::Mixin::TrainTransport
def load_credentials(profile)
Returns a RFC099 credentials profile as a hash
def load_credentials(profile) # Tomlrb.load_file returns a hash with keys as strings credentials = parse_credentials_file if contains_split_fqdn?(credentials, profile) logger.warn("Credentials file #{credentials_file_path} contains target '#{profile}' as a Hash, expected a string.") logger.warn("Hostnames must be surrounded by single quotes, e.g. ['host.example.org']") end # host names must be specified in credentials file as ['foo.example.org'] with quotes if !credentials.nil? && !credentials[profile].nil? credentials[profile].transform_keys(&:to_sym) # return symbolized keys to match Train.options() else nil end end