On Friday, February 15, 2013 9:56:09 AM UTC-6, Eugene Brodsky wrote: > > Hi all, first post here... reposting this from Stack Overflow as it didn't > get much traction there... > > I am using puppet to read a fact from facter, and based on that I apply a > different configuration to my modules. > Problem: > > the puppet agent isn't seeing this fact. Running puppet agent --test > interactively > works as expected. Even running it non-interactively from a script seems to > work fine. Only the agent *daemon* is screwing up. >
You seem to be assuming that the daemon will have the environment of a login shell, and that when it runs Facter it will provide its own full environment to the child process. Neither of those is a safe assumption. There are several ways to reliably provide custom facts to Puppet. The customary way is to write a bona fide Facter pluginand distribute it via Puppet's automatic pluginsync mechanism, and that's what I would recommend. If you want something simpler, however, then you might want to check out this plugin: https://github.com/ripienaar/facter-facts/tree/master/facts-dot-d. John -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
