Le 19/06/2015 à 05:59:54-0700, jcbollinger a écrit
>

Hi,

>

Sorry for the long time between my answer. And thank you for everything.

>
> That's not the case you first presented.  Nevertheless, you can use an array
> title if all the parameters take the same values, in which case it simply 
> looks
> like this:
>
> class my_service {
>   include ::things
>
>   $thinglist = [ 'first', 'second', 'third' ]
>
>   things::addthing { $thinglist:
>     param1 => 'value1',
>     param2 => 'value2',
>     # ...
>   }
> }
>
> If each may or does have distinct parameters, then your best bet is to
> externalize them instead of encoding them into your manifests (again: data
> first). There are then multiple ways to feed the parameters to your resources,
> and probably you can externalize the list of resources, too.  Automated data
> binding is a powerful and flexible tool, or you can access your external data
> directly, via the `hiera()` family of functions.  There are built-in functions
> that can help with handling the data, and some of the functions from the 
> Stdlib
> module can be really useful here.

Ok.

>
> There are many examples of this sort of thing available on the Forge and
> elsewhere.  If you want more concrete advice, then pose a more concrete
> question.

Well let's say I have a server with a lot of Vhost (apache). So I used

  apache::vhost { 'vhost1':
    }

  apache::vhost { 'vhost2':
    }

  etc..

what I want is to have inside one variable the list of all my vhost (event
by patching puppetlabs/apache module.

Yes I can create a huge hiera config but that's going to be very hard to
maintain because apache::vhost get lot of params. So I'm going to need to
create a very big hiera file.

Regards.

JAS


--
Albert SHIH
DIO bâtiment 15
Observatoire de Paris
5 Place Jules Janssen
92195 Meudon Cedex
France
Téléphone : +33 1 45 07 76 26/+33 6 86 69 95 71
xmpp: [email protected]
Heure local/Local time:
mer 24 jui 2015 13:18:45 CEST

-- 
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/20150624112830.GA79307%40pcjas.obspm.fr.
For more options, visit https://groups.google.com/d/optout.

Reply via email to