summaryrefslogtreecommitdiff
path: root/lib/facter
AgeCommit message (Collapse)Author
2012-02-07Merge branch '2.1.x' into 2.2.xKen Barber
* 2.1.x: (#12377) Avoid infinite loop when retrying require json
2012-02-06(#12377) Avoid infinite loop when retrying require jsonJeff McCune
Without this patch an infinite loop will be entered if the json and rubygems libraries are not available. This patch fixes the problem by retrying the `require 'json'` only if rubygems was successfully loaded for the first time. Subsequent attempts to load rubygems will cause the LoadError exception from a missing json library to be re-raised. Thanks to Krzysztof Wilczynski for pointing out this issue.
2011-10-03(#9859) Add root_home fact and testsJeff McCune
Without this patch applied, the stdlib module does not provide a root_home fact. This fact is necessary to easily determine the root account home directory on platforms Puppet is supported on. The major variations this fact address are: --- solaris: / linux: /root macosx: /var/root Spec tests using rspec have been provided as well to cover these three general cases. Windows tests are marked as pending.
2011-08-18(#9080) Make facts.d match Facter 2.0Jeff McCune
Based on feedback from Luke, the facts.d directory should at least match the directory that will be used by Facter 2.0. Reading #2157 I believe the Facter 2.0 facts.d feature is reasonably API compatible with this custom fact from R.I. so I'm comfortable using the same filesystem path. Change in behavior: Now look for facts in: * /etc/facter/facts.d * /etc/puppetlabs/facter/facts.d
2011-08-17(#9080) Add facts from /etc/puppetlabs/facts.dJeff McCune
This fact is a direct copy of R.I.'s work at https://github.com/ripienaar/facter-facts This is necessary plumbing to allow the installer to write a simple text file based on the role the node is receiving. For example: $ cat /etc/puppetlabs/facts.d/puppet_enterprise_mcollective.txt fact_stomp_port=61613 fact_stomp_server=puppetmaster fact_is_puppetagent=true fact_is_puppetmaster=true The mcollectivepe module relies on these facts being set and we need a persistent place to write them during the interview process and later read them when puppet agent runs to configure MCollective on the agent systems. Since stdlib is a public module, both /etc/facts.d and /etc/puppetlabs/facts.d are scanned for static facts.