| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
renames Facter::Util::Resolution#length to weight as a more generic
mechanism for allowing resolutions to state their importance
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On an OSX host:
$ facter operatingsystem
Darwin
$ facter_operatingsystem=Not_Darwin facter operatingsystem
Not_Darwin
But on a linux/solaris host:
$ facter operatingsystem
CentOS
$ facter_operatingsystem=Not_CentOS facter operatingsystem
CentOS
As the operatingsystem fact resolution for linux-based kernels has higher
precedence than the environment variable as it has more matching confines than
the value from the environment variable.
This patch adds from_environment to the resolution mechanism, which makes the
resolution have an artificially high weight by claiming the length of its
confines array is 1 billion.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ruby's Dir.entries will return files in different orders depending on
the OS and/or filesystem. As a result Facter::Util::Loader will load
ruby custom fact definitions in different orders on different platforms.
Specs to expose the bugs, and code to ensure that custom fact files are
loaded in alphabetical order.
Addresses redmine issue #5510
http://projects.puppetlabs.com/issues/5510
Signed-off-by: Rick Bradley <rick@rickbradley.com>
Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
|
|
|
|
|
|
| |
Fix facts added with empty blocks by handling calls to value when setcode not called
Ensure we handle load failures more gracefully
|
|
|
|
|
| |
Facter no longer knows anything about Puppet, so there's
no inter-dependency issue.
|
|
|
|
|
|
|
|
|
| |
I was previously creating a mock Puppet class, and this
actually uses Puppet's code.
Note that this use of Puppet creates some additional ordering
problems, which I'm going to fix in the next commit by
undoing all of this work. :)
|
|
|
|
|
| |
This should make it possible to move all facts to separate
files and only load them on demand.
|
|
This makes it easier for our loader to distinguish between
code that Facter uses and new facts.
|