Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Ok I found a workaround, not great, but it works. Since 'datadir' doesn't accept an array, whereas 'hierarchy', I tried using relative path for hierarchy instead, like this:

$  cat /etc/puppetlabs/code/hiera.yaml
  - yaml

  - "%{::role}"
  - common
  - "../../../hieradata/company_wide_hiera_data/common"      

    - "/etc/puppetlabs/code/environments/%{::environment}/hieradata"

Notice my "../../../" hack. Next I created the following yaml data file:


This approach worked. Does anyone else have a better approach?