Dotted facts should not be automatically promoted to structured facts. This functionality can be enabled trough a global facter setting which by default is set to false.
Dotted facts should not be automatically promoted to structured facts. This functionality can be enabled trough a global facter setting which by default is set to false.
DottedFacter 4 (up to 4.0.52) provides a way to create structured facts from multiple fact definitions. However, the feature is not compatible with other parts of the Puppet ecosystem and can cause facts to be named differently in Facter 4 than in Facter 2/3.
In order to avoid changing Puppet manifests, hiera lookups, PE classification rules, dotted facts should not be automatically promoted to structured facts. This functionality can Treating those facts as structured will still be enabled trough possible by usging a global facter setting which by default is set to false.
Eg:
default behavior {code:ruby} # custom fact Facter.add('a.b.c') do setcode { "d" } end
# external fact a.b.c=d
is represented as { "a.b.c": "d" } {code}
setting true {code:ruby} # custom fact Facter.add('a.b.c') do setcode { "d" } end
# external fact a.b.c=d
is represented as { "a": { "b": { "c": "d" } } {code}
Facter 4 (up to 4.0.52) provides a way to create structured facts from multiple fact definitions. However, the feature is not compatible with other parts of the Puppet ecosystem and can cause facts to be named differently in Facter 4 than in Facter 2/3.
In order to avoid changing Puppet manifests, hiera lookups, PE classification rules, dotted custom and external facts should not be automatically promoted to structured facts.
Treating those facts as structured will still be possible by usging a global facter setting which by default is set to false.
Gheorghe Popescu (Jira)
unread,
Apr 6, 2021, 7:58:02 AM4/6/21
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
Changes the way Facter 4 treats dots in fact names, reverting to the same behaviour as Facter 3. This means that by default, any dot in custom or external fact names will be considered as part of the fact name and not a delimiter for structured facts.
This also adds a global setting `autopromote-dotted-facts` which can be set to enable the conversion of dotted facts to structured.
Changes the way Facter 4 treats dots in fact names, reverting to the same behaviour as Facter 3. This means that by default, any dot in custom or external fact names will be considered as part of the fact name and not a delimiter for structured facts.
This also adds a global setting `autopromoteforce-dotteddot-factsresolution` which can be set to enable the conversion of dotted facts to structured.