I am having an issue accessing elements of a hash.

First, it is defined in hiera as such:

lb::rules:
  VCC: rule1
  GR: rule2

I retrieve the value using

$lb_rules = hiera('lb::rules')

Then I simply try to print out one of the values
ex:

     notify { "$lb_rules[VCC]": }

But get

Error 400 on SERVER: Evaluation Error: Missing title. The title expression
resulted in undef at
/etc/puppet/environments/sandbox/manifests/site.pp:14:11

If I don't specify a key and instead do

notify { "$lb_rules": }

I get

Error 400 on SERVER: Evaluation Error: Illegal title type at index 0.
Expected String, got Hash[String, String]

Confirming that lb_rules is a hash.

-- 
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 protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CA%2BNsY5jkQAEyamw7yauG2FWA6ktqeWGOVRZBCKaS_pW%2BYqS0OQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to