Sha256: 32afa6ef072683d739a619c7f9cfb3e0a33ec1ed2567503e401eb77cc71c724e

Contents?: true

Size: 492 Bytes

Versions: 9

Compression:

Stored size: 492 Bytes

Contents

require 'hiera/puppet_function'

# @see lib/puppet/parser/functions/hiera_include.rb for documentation
# TODO: Move docs here when the format has been determined.
#
Puppet::Functions.create_function(:hiera_include, Hiera::PuppetFunction) do
  init_dispatch

  def merge_type
    :array
  end

  def post_lookup(scope, key, value)
    raise Puppet::ParseError, "Could not find data item #{key}" if value.nil?
    call_function_with_scope(scope, 'include', value) unless value.empty?
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
puppet-4.2.3 lib/puppet/functions/hiera_include.rb
puppet-4.2.3-x86-mingw32 lib/puppet/functions/hiera_include.rb
puppet-4.2.3-x64-mingw32 lib/puppet/functions/hiera_include.rb
puppet-4.2.2 lib/puppet/functions/hiera_include.rb
puppet-4.2.2-x86-mingw32 lib/puppet/functions/hiera_include.rb
puppet-4.2.2-x64-mingw32 lib/puppet/functions/hiera_include.rb
puppet-4.2.1 lib/puppet/functions/hiera_include.rb
puppet-4.2.1-x86-mingw32 lib/puppet/functions/hiera_include.rb
puppet-4.2.1-x64-mingw32 lib/puppet/functions/hiera_include.rb