Class: Puppet::DataProviders::YamlDataProvider Private
- Inherits:
-
Plugins::DataProviders::PathBasedDataProvider
- Object
- Plugins::DataProviders::PathBasedDataProvider
- Puppet::DataProviders::YamlDataProvider
- Defined in:
- lib/puppet/data_providers/yaml_data_provider_factory.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Attribute Summary
Attributes inherited from Plugins::DataProviders::PathBasedDataProvider
Instance Method Summary collapse
Methods inherited from Plugins::DataProviders::PathBasedDataProvider
#initialize, #load_data, #unchecked_lookup, #validate_data
Methods included from Plugins::DataProviders::DataProvider
#data_key, #lookup, #name, #post_process, #unchecked_lookup, #validate_data
Methods included from Pops::Lookup::Interpolation
Methods included from Pops::Lookup::SubLookup
Constructor Details
This class inherits a constructor from Puppet::Plugins::DataProviders::PathBasedDataProvider
Instance Method Details
#initialize_data(path, lookup_invocation) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
19 20 21 22 23 24 25 26 |
# File 'lib/puppet/data_providers/yaml_data_provider_factory.rb', line 19 def initialize_data(path, lookup_invocation) data = YAML.load_file(path) HieraConfig.symkeys_to_string(data.nil? ? {} : data) rescue YAML::SyntaxError => ex # Psych errors includes the absolute path to the file, so no need to add that # to the message raise Puppet::DataBinding::LookupError, "Unable to parse #{ex.}" end |