On 30/05/17 17:09, Bret Wortman wrote:
I'm working on upgrading to the Hiera 5 spec and moving away from our
global config, but to do that I need to first make sure I have a working
H5 config file, so I set to translating our current one using the
Puppetlabs documentation.
I must be missing something critical because a slew of things get
defined differently when I run with the H5 file so I haven't been able
to cut over to it successfully yet.
Hiera 3 version:
---
:backends:
- yaml
:yaml:
:datadir: "/etc/puppetlabs/code/environments/%{::environment}/hieradata"
:hierarchy:
- "%{::hostname}"
- "%{::sitename}"
- common
Hiera 5 version:
---
version: 5
defaults:
datadir: hieradata
data_hash: yaml_data
hierarchy:
- name: "Per-node data"
path: "%{facts.hostname}.yaml"
- name: "Per-site data"
path: "%{facts.sitename}.yaml"
- name: "Other data"
paths:
- "common.yaml"
-----------
Am I missing something simple? Is there a good way to test (and the
"debugging hiera" page is pretty much useless if you're at this point
and are using environments to store your hiera data).
You can test with the CLI 'puppet lookup --explain' - you probably want
to make sure your node has called in to the master first so the facts
are available for it, but can run for the current node as well.
You also get the explain style output in the puppet log if you are
running with debug level logging turned on when compiling a catalog.
- henrik
--
You received this message because you are subscribed to the Google
Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected]
<mailto:[email protected]>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/ee507df8-8c6f-429a-9f95-a924b8c8960b%40googlegroups.com
<https://groups.google.com/d/msgid/puppet-users/ee507df8-8c6f-429a-9f95-a924b8c8960b%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.
--
Visit my Blog "Puppet on the Edge"
http://puppet-on-the-edge.blogspot.se/
--
You received this message because you are subscribed to the Google Groups "Puppet
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/ogm40b%24l17%241%40blaine.gmane.org.
For more options, visit https://groups.google.com/d/optout.