Overriding module parameter with hiera won't work on node level

asked 2016-04-27 11:08:27 -0600

Tech AGEBdeB gravatar image

updated 2016-05-02 07:31:57 -0600

I'm on Puppet 3.7.2 and Hiera 1.3.4

I'm using a basic ENC (hiera-enc) to create this hierarchy:

:hierarchy:
  - "nodes/%{clientcert}"
  - "roles/%{role}"
  - "environments/%{environment}"
  - default

I have no trouble passing classes and parameters on the role level. For example, this is a set of YAML files I have:

$ cat files/hiera/roles/agebdeb.yaml
---
classes:
  - ssh

ssh::ssh: false

...
$ cat files/hiera/nodes/age1.bdeb.qc.ca.yaml
---
classes:
  - ssh

ssh::ssh: true
...

But when I try to override a parameter on the node level, puppet won't apply it even though it sees the node YAML. Trying to compile to see if the nodes YAML files are read:

$ puppet master --debug --compile age1.bdeb.qc.ca | grep hiera
Debug: hiera(): Looking for data source nodes/age1.bdeb.qc.ca 
Debug: hiera(): Found classes in nodes/age1.bdeb.qc.ca
Debug: hiera(): Looking for data source roles/agebdeb
Debug: hiera(): Found classes in roles/agebdeb
Debug: hiera(): Looking for data source environments/client 
Debug: hiera(): Looking for data source default
Debug: hiera(): Looking up ssh::ssh in YAML backend 
Debug: hiera(): Looking for data source nodes/age1.bdeb.qc.ca
Debug: hiera(): Found ssh::ssh in nodes/age1.bdeb.qc.ca

Instead of being set to true, the ssh:ssh stays on false on this node.

What am I doing wrong?

edit retag flag offensive close merge delete

Comments

You'll need to update with info about what it's saying when it won't apply.

Alex Harvey gravatar imageAlex Harvey ( 2016-05-01 23:25:22 -0600 )edit

Well there is no error message. It is just as if the node YAML was not read at all when `puppet agent -t` is ran.

Tech AGEBdeB gravatar imageTech AGEBdeB ( 2016-05-02 07:28:07 -0600 )edit

On the information available it doesn't seem to me that you are doing anything wrong. The issue must lie elsewhere.

Alex Harvey gravatar imageAlex Harvey ( 2016-05-03 02:01:36 -0600 )edit