Ask Your Question

Hiera: Unable to pass parameters to nodes after declaring class (hiera_include).

asked 2017-06-14 11:15:33 -0600

loureiro gravatar image

updated 2017-06-15 12:05:39 -0600

DarylW gravatar image


I'm trying to move a class declaration out of the main manifest and use Hiera instead, on a new Dev environment we recently set up.

I'm using hiera_include('classes'), as I am looking at using Hiera to declare said classes and that works, the specific nodes pull the config from Puppet when I run the Puppet agent. What's not working for me is passing class parameters from Hiera, after declaring them. It just uses the default values. Specifically, I am trying to pass a new value for cassandra::datastax_repo::descr and cassandra::datastax_repo::pkg_url . Manifest code below:

class cassandra::datastax_repo (
  $descr   = 'DataStax Repo for Apache Cassandra',
  $key_id  = '7E41C00F85BFC1706C4FFFB3350200F2B999A372',
  $key_url = '',
  $pkg_url = undef,
  $release = 'stable',

Do I need to add some extra config somewhere else for this to work??

For more information, I am working this module: locp-cassandra and testing declaring the cassandra::datastax_repo class.


node 'default' {


  - yaml
  :datadir: "/etc/puppetlabs/code/environments/%{environment}/hieradata"
  - nodes/%{trusted.certname}
  - projects/%{project}
  - common


  - cassandra::datastax_repo

  descr: Test repo
  pkg_url: http://test.url
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2017-06-15 04:44:05 -0600

loureiro gravatar image

updated 2017-06-15 04:45:26 -0600

Solved, for some reason I had data_binding_terminus = none in my Puppetmaster's puppet.conf, thus disabling automatic parameter lookup from Hiera.

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools

1 follower


Asked: 2017-06-14 11:15:33 -0600

Seen: 138 times

Last updated: Jun 15 '17