Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mapped_paths is not recognized #248

Open
m-shaffer opened this issue Mar 22, 2019 · 1 comment
Open

mapped_paths is not recognized #248

m-shaffer opened this issue Mar 22, 2019 · 1 comment

Comments

@m-shaffer
Copy link

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 6.2.0
  • Ruby: 2.5.3p105
  • Distribution: Red Hat Enterprise Linux Server release 7.6
  • Module version: 3.3.4

How to reproduce (e.g Puppet code you use)

hiera::hierarchy:
  - name: 'role'
    lookup_key: 'eyaml_lookup_key'
    mapped_paths:
      - 'roles'
      - 'role'
      - "hieradata/%{environment}/role/%{literal('%')}{role}.yaml"
    options:
      pkcs7_private_key: /etc/puppetlabs/puppet/keys/private_key.pkcs7.pem
      pkcs7_public_key:  /etc/puppetlabs/puppet/keys/public_key.pkcs7.pem

What are you seeing

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Function Call, ${hierarchy} should be an array of hash (file: /etc/puppetlabs/code/environments/master/modules/hiera/manifests/init.pp, line: 251, column: 15) on node

What behaviour did you expect instead

Expected hiera.yaml to be generated like so:

hierarchy:
  - name: "role"
    mapped_paths:
      - roles
      - role
      - "hieradata/master/role/%{role}.yaml"

as described in https://puppet.com/docs/puppet/5.0/hiera_config_yaml_5.html#the-hierarchy-key

Output log

Any additional information you'd like to impart

@rodrigomgm
Copy link

I am having the same issue, created a PR( #285 ), however I am not sure if anything else is required. Tested locally and it worked

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants