and print the fact without any option and with --yaml and --json the only difference between facter 3 and 4 is how float numbers are printed with the yaml option:
On facter 3:
fact: 1135.015625
Facter 4:
fact: "1102.89"
The rest is the same. Facter 2 can't even solve the fact.
When printing hash values, everything works the same and no aggregate function is used.
When printing arrays there's a spacing difference when using the --yaml option:
Facter 3:
fact: - value 1 - value 2
Facter 4:
fact: - value 1 - value 2
Facter 2.5.7 and facter 4 are unable to solve aggregate custom facts, if they are written with like this: {code:java} /fact = Facter::Util::Fact.new('fact') fact.define_resolution('hgy', type: :aggregate) do
chunk(:physical_memory) do ['value 1'] end
chunk(:virtual_memory) do
['value 2'] end end fact.value/ code placeholder {code} fact.value on facter 3 yields:
[
"value 1",
"value 2"
]
facter 4 and 2.5.7 give return nil.
Also when aIf fact can't be resolved and --yaml.value is used missing from the outputs are:
Facter custom fact file, facter 3 and 4: won't show any result.
fact: ""
Facter 2 4 returns nil even if fact.5value is missing.7:
--- This happens because, by using this construction, thefact: is not added to the facts collection and it can't be found.
WhenThis behaviour is not documented and the --json normal way of creating facts is used: