Details
-
Bug
-
Status: Resolved
-
Normal
-
Resolution: Fixed
-
PUP 7.1.0
Description
Puppet Version: 7.1
OS Name/Version: macOS 11.1
The output of "puppet facts show somefact" is not the same as "facter somefact", as it returns JSON, which requires subsequent parsing to get the the fact value.
We use "facter --puppet somefact" quite a bit in non-puppet code, such as shell and python scripts and other internal management utilities. This is a strongly complicating issue in a migration from facter 3/puppet 6 to facter 4/puppet 7: "facter --puppet" no longer works in Facter 4, and I believe "puppet facts show somefact" only works in Puppet 7.
This will mean all the various places we use "facter --puppet somefact" will have to have a case on the puppet version and then call "facter --puppet somefact" or "puppet facts show somefact" as appropriate. And we'll have to do extra processing on the output of "puppet facts show", as it sends JSON.
Desired Behavior:
$ puppet facts show facterversion
4.0.47
$ facter facterversion
4.0.47
Actual Behavior:
$ puppet facts show facterversion
{
"facterversion": "4.0.47"
}
$ facter facterversion
4.0.47