Sha256: 8c587b23c3fcaf617174dc0492ed52c2e76114db66f82f548c99a02db8e1ef97
Contents?: true
Size: 1.02 KB
Versions: 12
Compression:
Stored size: 1.02 KB
Contents
# This file is loaded by the autoloader, and it does not find the hiera support unless required relative require_relative 'hiera_support' module Puppet::DataProviders # @api private class HieraModuleDataProvider < Puppet::Plugins::DataProviders::ModuleDataProvider include HieraSupport # Return the root of the module with the name equal to _data_key_ found in the environment of the given _scope_ # # @param data_key [String] the name of the module # @param scope [Puppet::Parser::Scope] the parser scope where the environment is found # @return [Pathname] Path to root of the environment # @raise [Puppet::DataBinder::LookupError] if the given module is can not be found # def provider_root(module_name, scope) env = scope.environment mod = env.modules.find { |m| m.name == module_name } raise Puppet::DataBinder::LookupError, "Environment '#{env.name}', cannot find module '#{module_name}'" unless mod Pathname.new(mod.path) end protected :provider_root end end
Version data entries
12 entries across 12 versions & 1 rubygems