Details
Description
I have a working puppet 2016.2.1 using code manager (r10k) and environments (dev, staging, prod). This is working great. I than started to utilize hiera. When setting the hiera.yaml (as shown below). I'm getting the error "Cannot find datafile /etc/puppetlabs/code/environments*//*hieradata/common.yaml, skipping"
#################################
|
---
|
:backends:
|
- yaml
|
|
:hierarchy:
|
- "nodes/%{::trusted.certname}"
|
- "%{environment}"
|
- "puppet_role/%{puppet_role}"
|
- common
|
|
:yaml:
|
:datadir: "/etc/puppetlabs/code/environments/%{::environment}/hieradata"
|
#############################################################
|
I notice the double backslash which is a problem. If I replace the environment variable with an actual environment name (e.g. :datadir: "/etc/puppetlabs/code/environments/development/hieradata") and run hiera --debug i get back results. Has anyone run into this?