Ask Your Question

hiera_include('classes') not working in puppet 3.8

asked 2015-10-15 06:58:32 -0600

Chutki gravatar image


I installed puppet 3.8 and used "hiera_include('classes')", but getting below error.

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find data item classes in any Hiera data file and no default supplied at /etc/puppetlabs/puppet/environments/production/manifests/site.pp:44 on node

below is site.pp file



hiera.yaml file

  - yaml
  - defaults
  - "%{clientcert}"
  - "%{environment}"
  - global
  - 'hieradata/common'

  :datadir: '/etc/puppetlabs/puppet'

Below is the maifests


class test{

notify {'Hi':}
include test

"puppet agent -t" compiling catalog without any error if I don't include "hiera_include('classes')" in site.pp

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-10-15 10:18:49 -0600

lupin gravatar image

updated 2015-10-15 10:22:47 -0600

Have you created the actual hiera data file that contain your classes? E.g.

on file

  - test

By the way, here's the link of relevant docs

edit flag offensive delete link more


yes. I created the actual yaml file /etc/puppetlabs/puppet/environments/production/hieradata/common.yaml --- classes: - test Also mentioned the details in hiera.yaml file

Chutki gravatar imageChutki ( 2015-10-15 11:29:35 -0600 )edit

Two things that you can check/verify. 1) hiera -d 'classes' on you puppet server 2) make sure your module has correct directory layout, with <module_name>/init.pp file.

lupin gravatar imagelupin ( 2015-10-15 13:38:36 -0600 )edit

Thanks. It worked.

Chutki gravatar imageChutki ( 2015-10-16 06:34:17 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2015-10-15 06:58:32 -0600

Seen: 998 times

Last updated: Oct 15 '15