----- Original Message -----
> Hi
> I want to create parametrized class with hash parameter from
> hiera .yaml file
>
> so i got
> hiera.yaml
> backends: - yaml
> - json
> - puppet
> :hierarchy: - %{host}
> - common
> :json:
> :datadir: /etc/puppet/hiera
> :yaml:
> :datadir: /etc/puppet/hiera
>
> :puppet:
> :datasource: data
>
> common.yaml
> ---
> mailserver:
> uid: 8
> gid: 8
>
> and
> init.pp
>
> class dovecot($mailserver = hiera_hash("mailserver"))
> {
> notice("${mailserver[uid]}")
> notice("${mailserver[gid]}")
> }
>
>
> i cant get values uid,gid from hash $mailserver
> how can i do that?
> or how to better debug why it is not working??
just do hiera("mailserver")
hiera_hash is a special lookup that builds a hash based on data found
at many levels of the hierarchy, if you have a single key with a array
or hash in it, then just look it up with hiera()
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.