I'm trying to reconcile the advice in the Puppet 3 class doc with our
current use of Hiera. We currently retrieve variables from Hiera in one big
collection while the Puppet 3 doc seems to indicate storing variables
without the collection.
For example, we have a module to manage a log indexer. In its init.pp it
$log_indexer_conf = hiera_hash('log_indexer_conf'),
log_indexer_conf => $log_indexer_conf}
One of the templates used says:
cluster.name: <%= @log_indexer_conf['elasticsearch_cluster_name'] %>
The associated log_indexer.yaml for Hiera is:
The Puppet 3
"Be sure to use 3.0-compatible lookup keys (<class name>::<parameter>).
This will let 2.x users declare the class with include, and their Hiera
data will continue to work without changes once they upgrade to Puppet 3."
This suggests that we should do the following in the template:
cluster.name: <%= @elasticsearch_cluster_name %>
and that the Hiera yaml should be:
Should we move that the module::variable style? What about when we have a
very large number of parameters - do we have to declare them in the class
definition (which is shy the _conf style might be nice) or does auto-lookup
mean you don't have to reference them anywhere until you actually do the
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to email@example.com.
To post to this group, send email to firstname.lastname@example.org.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.