Issue #11250 has been reported by Walter Heck.
----------------------------------------
Feature #11250: inheritance for environments on resource level instead of
module level
https://projects.puppetlabs.com/issues/11250
Author: Walter Heck
Status: Unreviewed
Priority: Normal
Assignee:
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.