Avi Miller wrote: > Hey gang, > > During the build of our Linux (EL4 and EL5) images, the kickstart > process writes out a file (/etc/sysconfig/soe) that contains: > > SOE_VERSION="Version string" > SOE_BUILD_DATE="2009-03-06" > > I then have /etc/profile.d/facter.sh scripts that has this: > > . /etc/sysconfig/puppet > . /etc/sysconfig/soe > FACTER_PUPPETMASTER=$PUPPET_SERVER > FACTER_SOE_VERSION=$SOE_VERSION > FACTER_SOE_BUILD_DATE=$SOE_BUILD_DATE > > If I login, obviously the profile is loaded, the envvars are created and > running puppetd manually means that Facter can see those envvars and my > motd template works (it inserts those values). > > However, when Puppet runs as a service, it doesn't seem to instantiate a > full profile for Facter, so those envvars are not visible. > > Is there a preferred/recommended way to ensure that Facter, when called > by Puppet as a service, sees particular envvars?
The files in /etc/profile.d are, as you found out, only loaded for interactive login sessions. I'd recommend putting those lines directly into /etc/sysconfig/puppet (except for the first one, of course), as it's considered a config file anyway. -- Frank Sweetser fs at wpi.edu | For every problem, there is a solution that WPI Senior Network Engineer | is simple, elegant, and wrong. - HL Mencken GPG fingerprint = 6174 1257 129E 0D21 D8D4 E8A3 8E39 29E3 E2E8 8CEC --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---