What the second structure you wrote evaluates to is a nested nested nested
hash.
{role => {ui => { public_hostname => test } } }
The keyword looked up in hiera, role::ui::hostname in this case, is just a
string, nothing special.
On Sunday, March 10, 2013 10:40:11 AM UTC-7, Bilco105
wrote:>
> Hi,
>
> I''ve just got hiera deployed into a new puppet environment, and
have
> defined a class as follows:
>
> modules/role/manifests/ui.pp
> ====================> class role::ui (
> $public_hostname
> ) {
> notify {''role::ui::notify'':
> message => "role::ui configured for ${::data_center};
hostname:
> $public_hostname",
> }
> }
>
> This is then included into the default node configuration.
>
> In my common.yaml, if I lay the file out as follows:
>
> manifests/hieradata/common.yaml
> ====================> ---
> role::ui::public_hostname: test
>
> It works fine, and the variable is available within my Puppet manifest.
> However, if I try and nest the YAML to make the configuration read cleaner:
>
> manifests/hieradata/common.yaml
> ====================> ---
> role:
> ui:
> public_hostname: test
>
> The same variable does not get passed through. Is this type of format not
> supported in either YAML or JSON?
>
> Thanks,
> Rob
>
--
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 puppet-users+unsubscribe@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.