On Monday, January 13, 2014 9:38:33 PM UTC-5, ianm wrote:
>
> On 14/01/14 03:49, Andrey Kozichev wrote:
>
> > This scenario works well if on the class input I just supply single
> > mountpoint -> then I do hiera("mountpointname") and create_resources()
> > But if I want to have multiple Mountpoints defined per host I need to
> > supply an Array to the class and then iterate it and fetch details for
> > each mountpoint. I can probably do this by using new 3.2 syntax with
> > "each", but I would like to avoid this.
> >
> > Do you have any better way to implement this?
>
> If in hiera you define a hash of hashes (instead of an array of hashes)
> you can pass that to create_resources which will create a resource for
> each hash.
>
>
> --
> Ian
> [email protected] <javascript:> Ian Mortimer
> Tel: +61 7 3346 8528 Science IT
> University of Queensland
>
Hi,
I have this implemented[1] such that you define a hash of your mounts
somewhere in Hiera. If you want to do a merge lookup against Hiera so that
if you specify the hash at multiple levels it gets all that it matches (ie:
fqdn, profile and environment levels), you can do this by setting
nfs::hiera_hash: true
[1] - https://github.com/ghoneycutt/puppet-module-nfs
BR,
-g
--
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/686fbb38-da1e-4f25-baa1-ef8d6d0ca841%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.