Sha256: 7b8c0b1360d6085d5ad3c33a71e618b41eed004440b11ad2933e27d1a3246c58
Contents?: true
Size: 676 Bytes
Versions: 16
Compression:
Stored size: 676 Bytes
Contents
class R10K::Source::Yaml < R10K::Source::Hash R10K::Source.register(:yaml, self) def initialize(name, basedir, options = {}) config = options[:config] || '/etc/puppetlabs/r10k/environments.yaml' begin contents = ::YAML.load_file(config) rescue => e raise ConfigError, _("Couldn't open environments file %{file}: %{err}") % {file: config, err: e.message} end # Set the environments key for the parent class to consume options[:environments] = contents # All we need to do is supply options with the :environments hash. # The R10K::Source::Hash parent class takes care of the rest. super(name, basedir, options) end end
Version data entries
16 entries across 16 versions & 1 rubygems