Facter 2.0: Release Notes
This version of Facter is not included in Puppet Enterprise. The latest version of PE includes Facter 3.1. A newer version is available; see the version menu above for details.
This page documents the history of the Facter 2.0 series.
Released June 10, 2014.
Facter 2.0.2 is a security release in the Facter 2 series. It has no other bug fixes or new features.
CVE-2014-3248 (An attacker could convince an administrator to unknowingly execute malicious code on platforms with Ruby 1.9.1 and earlier)
When running on Ruby 1.9.1 or earlier, previous versions of Facter would load Ruby source files from the current working directory. This could lead to the execution of arbitrary code.
Released April 1, 2014. (RC1: February 28; RC2: March 12; RC3: March 25; RC4: March 28.)
Facter 2.0.1 is the first release in the Facter 2 series. (See the note below about Facter 2.0.0.)
More Return Types and Structured Facts
Facts are no longer limited to strings; they can now return any of the following types: Integer, Float, TrueClass, FalseClass, NilClass, String, Array, Hash. The last two are especially significant – facts can now combine associated pieces of information into a single data structure. Facter 2.0.1 doesn’t include any structured facts yet, but you can start writing your own custom structured facts immediately.
Facter 2 also adds aggregate resolutions, which allow you to resolve a fact in multiple steps rather than all in one
setcode statement. Aggregate resolutions are great for structured facts, but you can also use them to resolve complex flat facts as well. See Writing Facts With Aggregate Resolutions for more details and examples.
Pluginsync for External Facts
External facts have been around since Facter 1.7, but there hasn’t been a way to effectively include them in modules until now. If you’re using Puppet 3.4 or later with Facter 2.0.1, you can now include external facts in
<MODULEPATH>/<MODULE>/facts.d/ and they will be distributed to agent nodes.
selinux_modehas been removed since it was duplicated by
memorytotalhas been removed since it was duplicated by
- Fact values can now only be accessed using the
Facter.valuemethod. See Using other facts in the Custom Facts Walkthrough for more information and examples. Facts that refer to other facts with the deprecated
Facter.fact_namenotation will have to be updated.
- Previously, Facter would treat the empty string as
nil(a falsey value). Because Facter 2 allows resolutions to return
nildirectly, the empty string is now treated just like any other string (i.e., truthy). Custom facts that relied on this behavior in the past will need to be updated. The only exception is the string form of the
setcode 'lsb_release -a'), which still treats the empty string (or a non-zero exit code) as
Facter.execution.execmethod is deprecated and can be replaced with
Facter now does sanity checking on the output of facts. Facter previously assumed that all facts would be of type String but did not enforce this; Facter now validates that facts are one of (Integer, Float, TrueClass, FalseClass, NilClass, String, Array, Hash).
On Windows, the
operatingsystemrelease fact now returns
2012, depending on the version reported by WMI.
Removes vendored code for CFPropertyList in favor of treating it as a separate dependency and managing it with Rubygems.
In Facter 1.x the fact search path would be recursively loaded, but only when using Facter via the command line. In Facter 2.0 only fact files at the top level of the search path will be loaded, which matches the behavior when loading facts with Puppet.
Adds several improvements to
Facter::Util::Confine, including the ability to confine a fact to a block.
Code that had previously been marked deprecated has now been removed.
Previous versions of Facter would interpret an empty string (and only an empty string) as
nil. Now that facts can return more than just strings (i.e., they can directly return
nil), empty strings no longer have this special case.
Adds Windows-specific gem dependencies for Facter 2.
Removes all instances of
ldapname, completing its deprecation.
Fedora 18 has reached end-of-life and will no longer be supported. This release removes F18 as a build target.
The man page for Facter 2 now includes the new command line options.
This release adds spec and acceptance tests for Ubuntu 14.04, also known as Trusty Tahr.
Earlier versions of Facter included support for Ruby 1.8.5, which required a number of monkey patches for compatibility. As of Facter 2.0.1 RC4, the minimum supported version of Ruby is 1.8.7.
On Solaris 10, the operatingsystemrelease fact would incorrectly be set to the update version. This release corrects the bug.
One of the possible resolutions for the
macaddress fact would incorrectly return
nil. This release fixes the bug.
This bug would cause the netmask fact to fail on Darwin under some circumstances. This release fixes the bug.
These two bugs were caused by FACT-322 (remove special casing of the empty string). Previous versions of facter would ignore facts that returned
"", and the LSB and VLAN facts depended on this behavior to ensure that they wouldn’t appear on systems where they weren’t relevant. Once the special casing of the empty string was removed in Facter 2.0.1, facts that returned
"" would show up in facter’s output as
"", rather than not showing up at all. The LSB and VLAN facts have been updated to fix this bug.
For historical reasons, Facter 2.0.0 was never released. Facter 2.0.1 is the first release in the Facter 2 series.
In May 2012, several release candidates were published for a Facter 2.0.0 release, using code that had diverged from the 1.6 series. After testing it, the Puppet community and developers decided that this code wasn’t yet usable and the release was canceled, in favor of continuing work that became the Facter 1.7 series.
Since the 2.0.0rc1 tag in the Facter repo was already occupied by that canceled release, and since issuing a RC5 out of nowhere might have been confusing, we decided to go directly to 2.0.1 instead.