On May 18, 2010, at 11:04 AM, Markus Roberts wrote:
L --
We used to require environments be strictly listed, but we stopped
that at the request of the community.
Not really though? We did have a list of them as well as a list of
environment definitions, now we just have a list of environment
definitions. Isn't that our authoritative info on whether an
environment exists or not? What is an environment if you haven't
defined *something* in a [environment_name] block in the server
config file?
None of this stuff is really modeled in Puppet right now, though -
you can ask the Settings instance for an environment-specific
setting, but you can't actually ask it what the defined environments
are.
We'd have to add that "does an environment exist?" modeling to
Settings, which would get a bit confusing because executables and
environments can both have sections in puppet.conf.
This is another example of the "explicitly vs. implicitly modeled"
stuff. Ignoring the namespace issue for the moment, we already have
Puppet.settings.sectionlist (which doesn't seem to work in master,
BTW) and Puppet.settings.eachsection (which does); we don't really
need a "add that 'does an environment exist?' modeling to Setting"
if we fix sectionlist, as it would then just be
Puppet.settings.sectionlist.include?(x).
You wish. :)
'Sections' are what Settings uses for the 'use' method - that is, to
know which directories it should create and which files it should
manage, such as 'ca', 'ssl', 'main'.
The names that you can use in a config file could also be considered
sections, but they're different kinds of sections.
And yes, those two dimensions of configurability are actually useful,
even if they're (shockingly) poorly named.
--
Progress isn't made by early risers. It's made by lazy men trying to
find easier ways to do something. --Robert Heinlein
---------------------------------------------------------------------
Luke Kanies -|- http://puppetlabs.com -|- +1(615)594-8199
--
You received this message because you are subscribed to the Google Groups "Puppet
Developers" 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-dev?hl=en.