On Monday, March 24, 2014 12:10:24 AM UTC-5, [email protected] wrote:
>
> Given this hash of arrays:
>
> $players = {
>   'joe' => [
>     '150',
>     '200',
>   ],
>   'janet' => 
>     '120',
>     '240',
>   ],
> }
>
> ... and given a define that's like this: 
>
> profile::generate {$player:
>   source => "puppet:///modules/$module_name/$player"
> }
>
> ... how do you call profile::generater without hardcoding 2 defines? 
>


It's not entirely clear what you're after.  I'm guessing you want to 
declare one defined type instance for each element of each (array) value of 
your $players hash, but I don't see how those elements are expected to be 
exposed to the profile::generator definition.

It is anyway likely that the answer involves another level of defined type, 
but the details depend on the nature of the data and what you are trying to 
do with it.  In particular, if you can rely on the numbers being globally 
unique then that could make things simpler.


John

-- 
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/49fb265b-f63c-4d05-85d2-6654e475d941%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to