Sha256: bae16e3d9f442211f48f7de6a00d17eb0ca4187f613d1658a5d7766f6970a3ec
Contents?: true
Size: 830 Bytes
Versions: 31
Compression:
Stored size: 830 Bytes
Contents
# frozen_string_literal: true require 'hiera' class Hiera module Backend # rubocop:disable Naming/ClassAndModuleCamelCase class Overrides_backend def initialize Hiera.debug('Hiera overrides backend starting') end def lookup(key, scope, _order_override, resolution_type, _context) Hiera.debug( "Looking up #{key} in overrides backend with #{resolution_type}" ) overrides = scope && scope['overrides'] Hiera.debug("Found overrides: #{overrides}") throw(:no_such_key) unless overrides override = overrides[key.to_s] Hiera.debug("Found override: #{override} for key: #{key}") Backend.parse_answer(override || throw(:no_such_key), scope) end end # rubocop:enable Naming/ClassAndModuleCamelCase end end
Version data entries
31 entries across 31 versions & 1 rubygems