Skip to content

Instantly share code, notes, and snippets.

@benagricola
Last active December 16, 2015 17:59
Show Gist options
  • Save benagricola/5474371 to your computer and use it in GitHub Desktop.
Save benagricola/5474371 to your computer and use it in GitHub Desktop.
%{calling_module} in 3.2.0-rc1 doesn't work for automatic lookups?
---
test::test1: common.yaml
test::test2: common.yaml
---
test::test1: test.yaml
test::test2: test.yaml
---
:backends:
- yaml
:yaml:
:datadir: '/etc/puppet/hiera'
:logger: console
:hierarchy:
- common/%{calling_class}
- common/common
class test (
$test1 = "default",
) {
$test2 = hiera("test::test2")
notify { "TEST1: $test1": } # Should print 'TEST1: test.yaml'
notify { "TEST2: $test2": } # Should print 'TEST2: test.yaml'
}
Debug: hiera(): Hiera YAML backend starting
Debug: hiera(): Looking up test::test1 in YAML backend
Debug: hiera(): Looking for data source common/common
Debug: hiera(): Found test::test1 in common/common
Debug: hiera(): Looking up test::test2 in YAML backend
Debug: hiera(): Looking for data source common/test
Debug: hiera(): Found test::test2 in common/test
Debug: Creating default schedules
Notice: /Stage[main]/Test/Notify[TEST1: common.yaml]/message: current_value absent, should be TEST1: common.yaml (noop)
Debug: /Stage[main]/Test/Notify[TEST1: common.yaml]: The container Class[Test] will propagate my refresh event
Debug: /Schedule[never]: Skipping device resources because running on a host
Notice: /Stage[main]/Test/Notify[TEST2: test.yaml]/message: current_value absent, should be TEST2: test.yaml (noop)
Debug: /Stage[main]/Test/Notify[TEST2: test.yaml]: The container Class[Test] will propagate my refresh event
Notice: Class[Test]: Would have triggered 'refresh' from 2 events
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment