On May 31, 2010, at 2:36 PM, William Van Hevelingen wrote:
Facter.envfact(:deploydate) { confine :kernel => %w{Windows} }
Thanks that looks great.
In general, the reason I've always avoided relying on ENV is that
it's so easy for the data to not be right at different times, at
least I think I've experienced that. It's always tough to track
whether a given ENV variable is overwriteable, guaranteed, always
set, etc.
Yea I noticed that the documentation is very hard to find
concerning the ENV object and whether any ENV variables are
guaranteed.
It's not about the ENV hash itself, it's about what the shell/
environment actually provides. And trusting, say, HP-UX vs. Debian
vs. Red Hat to provide similar information just seemed crazy. And I
wrote most of the first versions of Facter specifically because I was
so distrustful if everything the OS thought I wanted to know.
--
If it jams, force it. If it breaks, it probably needed replacing
anyway. -- Lowrey's Law
---------------------------------------------------------------------
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.