Sha256: d54d920d233b780ff2a11e8c87bba4b65cc40a5623c5242cee61533fc6b52e69

Contents?: true

Size: 1.09 KB

Versions: 66

Compression:

Stored size: 1.09 KB

Contents

require 'hiera_puppet'

module Puppet::Parser::Functions
  newfunction(:hiera, :type => :rvalue, :arity => -2, :doc => "Performs a
  standard priority lookup and returns the most specific value for a given key.
  The returned value can be data of any type (strings, arrays, or hashes). 

  In addition to the required `key` argument, `hiera` accepts two additional
  arguments:

  - a `default` argument in the second position, providing a value to be
    returned in the absence of matches to the `key` argument
  - an `override` argument in the third position, providing a data source
    to consult for matching values, even if it would not ordinarily be
    part of the matched hierarchy. If Hiera doesn't find a matching key
    in the named override data source, it will continue to search through the
    rest of the hierarchy.

  More thorough examples of `hiera` are available at:  
  <http://docs.puppetlabs.com/hiera/1/puppet.html#hiera-lookup-functions>
  ") do |*args|
    key, default, override = HieraPuppet.parse_args(args)
    HieraPuppet.lookup(key, default, self, override, :priority)
  end
end

Version data entries

66 entries across 66 versions & 2 rubygems

Version Path
puppet-retrospec-0.12.2 vendor/gems/puppet-3.7.3/lib/puppet/parser/functions/hiera.rb
puppet-retrospec-0.12.1 vendor/gems/puppet-3.7.3/lib/puppet/parser/functions/hiera.rb
puppet-retrospec-0.12.0 vendor/gems/puppet-3.7.3/lib/puppet/parser/functions/hiera.rb
puppet-retrospec-0.11.0 vendor/gems/puppet-3.7.3/lib/puppet/parser/functions/hiera.rb
puppet-retrospec-0.10.0 vendor/gems/puppet-3.7.3/lib/puppet/parser/functions/hiera.rb
puppet-retrospec-0.9.1 vendor/gems/puppet-3.7.3/lib/puppet/parser/functions/hiera.rb
puppet-retrospec-0.9.0 vendor/gems/puppet-3.7.3/lib/puppet/parser/functions/hiera.rb
puppet-retrospec-0.8.1 vendor/gems/puppet-3.7.3/lib/puppet/parser/functions/hiera.rb
puppet-retrospec-0.8.0 vendor/gems/puppet-3.7.3/lib/puppet/parser/functions/hiera.rb
puppet-retrospec-0.7.3 vendor/gems/puppet-3.7.3/lib/puppet/parser/functions/hiera.rb
puppet-retrospec-0.7.2 vendor/gems/puppet-3.7.3/lib/puppet/parser/functions/hiera.rb
puppet-3.7.4 lib/puppet/parser/functions/hiera.rb
puppet-3.7.4-x86-mingw32 lib/puppet/parser/functions/hiera.rb
puppet-3.7.4-x64-mingw32 lib/puppet/parser/functions/hiera.rb
puppet-3.7.3 lib/puppet/parser/functions/hiera.rb
puppet-3.7.3-x86-mingw32 lib/puppet/parser/functions/hiera.rb
puppet-3.7.3-x64-mingw32 lib/puppet/parser/functions/hiera.rb
puppet-3.7.2 lib/puppet/parser/functions/hiera.rb
puppet-3.7.2-x86-mingw32 lib/puppet/parser/functions/hiera.rb
puppet-3.7.2-x64-mingw32 lib/puppet/parser/functions/hiera.rb