Ask Your Question

hiera only finding common.yaml and fqdn.yaml [closed]

asked 2016-09-01 16:17:30 -0600

tab gravatar image

Hi All, I'm working on a new Puppet setup and I'm running into an issue with hiera where it only applies classes found in common.yaml or $fqdn.yaml. The Puppet Server is CentOS 6.8 running puppetserver.noarch 2.5.0-1.el6 @puppetlabs-pc1.

Below is my site.pp, following that is my hiera.yaml

cat site.pp

File {
  backup => false,
cat hiera.yaml
      - yaml
      :datadir: "/etc/puppetlabs/code/environments/development/hieradata"
      - "nodes/%{::fqdn}"
      - "osfamily/%{}-%{::os.release.major}"
      - "osfamily/%{}"
      - common

Below is the directory structure with directories for osfamily as well as individual nodes.

├── common.yaml
├── hiera.yaml
├── nodes
│   ├──
│   └──
└── osfamily
    ├── RedHat-6.yaml
    ├── RedHat-7.yaml
    └── RedHat.yaml

The yaml files are very simple since I've been trying to cut everything out while debugging this.

cat common.yaml
  - bash
cat nodes/
  - glibc
cat nodes/
  - glibc
cat osfamily/RedHat-6.yaml
  - postfix
cat osfamily/RedHat-7.yaml
  - postfix
cat osfamily/RedHat.yaml
  - httpd

I've been browsing the questions related to hiera, and it seems a lot of people have issues similar to this, one person updated to the latest and the issue vanished. I have verified the clients are sending the and os.release.major facts. Thanks for taking a look.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by tab
close date 2016-09-02 08:17:34.121131

1 Answer

Sort by » oldest newest most voted

answered 2016-09-02 08:17:06 -0600

tab gravatar image

I ended up figuring this out, I needed to symlink /etc/puppetlabs/code/environments/development/hieradata/hiera.yaml to /etc/puppetlabs/puppet/puppet.conf

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2016-09-01 16:17:30 -0600

Seen: 260 times

Last updated: Sep 02 '16