On Tue, Oct 11, 2011 at 2:14 PM, Gonzalo Servat <[email protected]> wrote:

> Hi All,
>
> In our environment, we have production and DR puppet clients that live on
> different networks. Currently, we do things like "include s_service::prod"
> or "include s_service::dr", etc. Both of these subclasses would inherit from
> s_service where common things lie.
>
> I am re-doing the Puppet config and trying to come up with a better way of
> solving the multiple environment problem. Sometimes files need to be sourced
> that depend on their environment. Currently we do "source =>
> puppet:///${env}/file", which isn't very nice.
>

Are you saying you're sourcing files from outside the current environment
for the client?

if you put your files into modules that differ per environment, then
something like:

puppet:///modules/mymodule/myfile

will resolve to $modulepath/mymodule/files/myfile separately for each
environment automatically.



>
> I have created 2 new facter variables that identify whether the host is
> prod or DR (based on the network they sit on), whereas before we would set
> the zone statically in nodes.pp.
>
> How do you guys solve the multiple environment problem? Is it best to use
> templates and have if statements in them?
>
> Thanks in advance.
> Gonzalo
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>



-- 
Nigel Kersten
Product Manager, Puppet Labs

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

Reply via email to