| It appears that yaml anchors have stopped working in facter 4. In facter 3, this external yaml fact is processed correctly:
// "/opt/puppetlabs/facter/facts.d/test.yaml" 13L, 118C 9,7 All |
--- |
one: |
ipam: |
a: |
&a1 |
- foo |
cname: |
&a2 |
- bar |
two: |
IPAM: |
A: *a1 |
CNAME: *a2 |
When running puppet facts --debug:
// ESC[0;36mDebug: Facter: resolving facts from YAML file "/opt/puppetlabs/facter/facts.d/test.yaml".ESC[0m |
ESC[0;36mDebug: Facter: fact "one" has resolved to { |
ipam => { |
a => [ |
"foo" |
], |
cname => [ |
"bar" |
] |
} |
}.ESC[0m |
In facter 4, this fails:
// c:Error: Facter: Failed to handle /opt/puppetlabs/facter/facts.d/test.yaml as LegacyFacter::Util::Parser::YamlParser facts: Unknown alias: a1 |
The expectation is that yaml anchors should function the same as they did in prior versions. Support has recommended their use on multiple prior occasions. |