Issue #11250 has been updated by Daniel Pittman.

Status changed from Unreviewed to Investigating
Assignee set to Nigel Kersten

G'day Walter.  This sounds like a use case for Hiera, and especially the 
integration we are thinking about around that.  I have forwarded the ticket 
through to our product manager for consideration in that regard.  We love to 
have real world stories about how people want these things to work, so we know 
that at least one person will be happy with what we build. ;)

For your personal case, I suggest you do take a look at Hiera and see if it can 
help you out.
----------------------------------------
Feature #11250: inheritance for environments on resource level instead of 
module level
https://projects.puppetlabs.com/issues/11250

Author: Walter Heck
Status: Investigating
Priority: Normal
Assignee: Nigel Kersten
Category: modules
Target version: 
Affected Puppet version: 
Keywords: 
Branch: 


We have a staging environment that has only minor changes from production 
(example: apt and dns modules contain small changes because they are in 
geographically different places).

Obviously, we could use something like:
<pre>nameservers => environment ? {
    staging    => [123.1.2.3, 124.3.2.1]
    production => [127.1.2.4, 125.7.3.1]
}


file { /etc/resolve.conf:
    source => template://puppet/dns/resolve.conf
}</pre>

But I'm not a big fan of that, as it gets messy when the changes are larger. 
Besides that, I like to think that sometime in the future I want to release our 
module library to the public, which means I don't want them cluttered with 'if 
$environment == ' statements.
The approach used now is that we have two modules in 
$confdir/environments/$environment/modules. These modules however, are only 
marginally different from their production versions (minor apt and dns 
changes). Even so, the whol module needs to be duplicated, which brings with it 
soem dangers.

What I would like to see is a possibility to have resource-level inheritance 
instead of module-level inheritance. So if we're in environment X and I'm 
including a class apt::repo::backports, autoloading check 
$confdir/environments/X/modules/apt/manifests/repo/backports.pp only, the rest 
of the apt module doesn't need to be there. That way, changes between different 
environments stay small.

Not sure if it is clear, feel free to ask questions.


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" 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-bugs?hl=en.

Reply via email to