Uploaded image for project: 'Hiera'
  1. Hiera
  2. HI-541

Hiera cannot find datadir

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Normal
    • Resolution: Incomplete
    • Affects Version/s: HI 3.2.0
    • Fix Version/s: None
    • Component/s: UX
    • Labels:
    • Environment:

      CentOS Linux release 7.2.1511 (Core)
      Puppet 4.5.3 (2016.2.1)strong text
      Hiera 3.2.0

    • Template:

      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?

        Attachments

          Activity

            People

            Assignee:
            jenny Jenny Mahmoudi
            Reporter:
            paultath81 Paul T
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Zendesk Support