Age | Commit message (Collapse) | Author |
|
On Windows, we have no folders that match up to the default set of
directories the facter_dot_d fact looks in by default. This is a
problem because the Puppet Enterprise installer writes out the following
facts by default, and our modules require them to be present:
% cat /etc/puppetlabs/facter/facts.d/puppet_enterprise_installer.txt
fact_stomp_port=61613
fact_stomp_server=puppetmaster
fact_is_puppetagent=true
fact_is_puppetmaster=true
fact_is_puppetconsole=true
On windows, the Puppet confdir is quite variable. On 2003 systems we
default to the All Users application data directory. On 2008 systems we
default to the ProgramData directory. The actual configuration
directory varies depending on the Puppet or Puppet Enterprise branding.
In order to simplify all of this variable behavior, this patch fixes the
problem by automatically looking for facts in
`%COMMON_APPDATA%/PuppetLabs/facter/facts.d`
This patch paves the way for the MSI installer to use an IniFile element
to write custom facts during installation.
|
|
* 2.2.x:
(#12377) Avoid infinite loop when retrying require json
|
|
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.
|
|
This is causing a little confusion, so make the comment match
the behaviour.
|
|
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
|
|
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.
|