Re: RFC: Environment configured by fact

Luke Kanies
Thu, 07 Feb 2008 20:32:51 -0000

On Feb 7, 2008, at 1:07 PM, Philip Walls wrote:

> It would be handy to set the environment of a puppet client with the
> $environment fact regardless of the version of said client.
>
> Currently the puppetmaster prefers the ''environment''
configuration
> option over the $environment fact, causing behavior to diverge between
> <0.24 and <=0.24 clients. Since <0.24 clients don''t have
a default
> value for that configuration option, the fact is authoritative.
> However, the >=0.24 clients set a default for the configuration option
> (''development''), making the fact moot.
>
> The most straight forward solution would be to have the puppetmaster
> always prefer the $environment fact.
>
> Is there an argument for the configuration option taking precedence
> over the fact? Is it worth the added complexity of only preferring the
> fact if the configuration option hasn''t been set explicitly?


Yeah -- pluginsync is affected by the environment, and client facts
are not available to the server during this phase of the configuration.

It would obviously be straightforward to add a setting that allowed us
to configure this on the server, but I can''t really decide if
that''s a
good idea or not.  Maybe it could be a temporary option, with a
deprecation notice or something; I wouldn''t want it to stay around
forever.

Anyone else have an opinion?

--
Puritanism: The haunting fear that someone, somewhere, may be happy.
     -- H. L. Mencken
---------------------------------------------------------------------
Luke Kanies | http://reductivelabs.com | http://madstop.com