Class: ConfigBuilder::Loader::YAML_ERB
- Defined in:
- lib/config_builder/loader/yaml_erb.rb
Instance Method Summary collapse
-
#yamlfile(file_path) ⇒ Hash
Load configuration from a YAML file with ERB interpolation first.
Methods inherited from YAML
Instance Method Details
#yamlfile(file_path) ⇒ Hash
Load configuration from a YAML file with ERB interpolation first
determine whether to use the environment variable 'VAGRANT_MANIFEST' or the default value 'init.pp' for the puppet manifest file.
provisioner: - type: puppet manifest_file: <%= ENV['VAGRANT_MANIFEST'] || 'init.pp' >
19 20 21 |
# File 'lib/config_builder/loader/yaml_erb.rb', line 19 def yamlfile(file_path) ::YAML.load(::ERB.new(File.read(file_path)).result) end |