I'd recommend looking into using an external node classifier. I like
Foreman, though it doesn't support parameterized classes yet (there is
an easy workaround though).

Adam

On Feb 11, 3:24 pm, Tony C <tonyjch...@gmail.com> wrote:
> Hello Everyone,
>
> I'm still pretty new with puppet so please bare with me. I tried
> searching and I'm pretty sure I've ready my answer but I'm not sure if
> I'm going down the right path just yet.
>
> My scenario is this: I have 4 environments, Dev, Test, QA, Prod. Each
> of these environments lives in 2 sites, LA and NY. I have 5
> applications that are site and env specific.
>
> I want to use puppet to template-ize the config files that is required
> for each env, per site, per app, so 40 files.
>
> The config file is basically key=value pairs. Here's a simple example
> of what each file may look like:
>
> site=LA
> env=Dev
> app=App1
> masterServer=host1
> clientServer1=host2
> clientServer2=host3
>
> Even more interesting, the the config files have the naming structure
> app_site_env.properites. So lots of the same, over and over again,
> just different values. Let's say the machine managing these files is
> called
>
> node configbox
>
> My first idea was to create an erb of that config file, use
> parameterized classes and variables to fill in the blanks, some if/
> else logic and the populate each file. That works. The thing is, I
> will have 40 modules with the same init.pp and anytime I update
> something, I'd have to make that change across 39 more modules!
>
> What is the best strategy to reuse a base module, and then apply
> specific values on top of that base module based on some condition? Do
> I use inherit or subclasses?
>
> config
> config::app and then in that config::app define what I need to replace
> depending on site and env?
>
> Sorry for the long winded and confusing post.
>
> Thanks so much!
>
> Tony

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to