Chad,
Thanks for the reply. I am using /etc/puppet/heiradata for the
location of all my hiera files.
[root@puppet-master-t1 puppet]# ls hieradata/
defaults.yaml global.yaml groups hosts
Referencing non hashed/array variables from init.pp works. However, I
cannot get the array variable $log_status2 - it is being returned as a
string. I've included a snip of my init.pp file with comments to give
more details. I've looked at the limited hiera docs included the one
you sent, I'm clearly doing something wrong.
Appreciate the help.
JJ
class log_special
(
#log_special::log_vars: "test"
$log_vars=log_vars,
#log_special::log_vars2:
# b: 'fdsa'
# c: 'fdsaaaa'
$log_vars2=hiera_hash('log_vars'),
$log_vars2=$log_vars2['b']
)
{
exec{"log_vars": command=> "/bin/echo '${log_vars}'", logoutput=>true;}
#Debug: Executing '/bin/echo 'test'
exec{"log_vars2": command=> "/bin/echo '${log_vars2}'", logoutput=>true;}
#Debug: Executing '/bin/echo 'bfdsacfdsaaaa''
> You received this message because you are subscribed to a topic in the Google Groups "Puppet Users" group.
> To unsubscribe from this topic, visit
https://groups.google.com/d/topic/puppet-users/3A5F9Wh6RdY/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
puppet-users...@googlegroups.com.