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). -- M ----------------------------------------------------------- The power of accurate observation is commonly called cynicism by those who have not got it. ~George Bernard Shaw ------------------------------------------------------------ -- 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.
