Re: [Puppet Users] Re: defined types and enc

erkan yanar
Fri, 09 Nov 2012 00:29:08 -0000

Hi, Im still confused:

On Fri, Oct 26, 2012 at 12:24:52PM -0700, jcbollinger
wrote:
>
>
> On Friday, October 26, 2012 11:32:36 AM UTC-5, erkules wrote:
> >
>
> > If not is there a trick to call a class many times for a node. (Maybe
by
> > manipulating the name?)
> >
> >
> You can create classes with different names but similar content, or you can
> use one class that wraps all the resources you want.  For example,
>
> class mymodule::lxc_application_containers {
>   mymodule::lxc_application_container { ''container1:
>     application => ''Awesomeness1.1''
>     # other parameters
>   }
>   mymodule::lxc_application_container { ''container2:
>     application => ''Moneymaker3.2''
>     # other parameters
>   }
>   # other containers ...
> }
>
> Supposing that the point is to select a subset of the available
> applications for each target node, using the one-class approach, you can do
> that via global variables (yuck), class parameters (meh), or data from an
> external source (best bet).

So you got a fixed number in here where you filter the right ones?
I would like to call the class with parameters  and for each parameter
the defined type is called. Where a parameter is a hash with 3 keys (where one
is the name).
With this I could decide to run more or less containers just by adding
parameters.

I don''t know if this is a possible way to implement my needs *kopfkraz*

Regards