Skip to content

(PUP-10853) Remove usage of legacy facts #8492

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Feb 25, 2021

Conversation

GabrielNagy
Copy link
Contributor

@GabrielNagy GabrielNagy commented Jan 22, 2021

This PR aims to replace all usage of legacy facts with structured facts. The minimum Facter dependency also has to be bumped since Facter 2 does not have structured facts.

@luchihoratiu
Copy link
Contributor

jenkins please test this

1 similar comment
@luchihoratiu
Copy link
Contributor

jenkins please test this

@GabrielNagy GabrielNagy force-pushed the PUP-10853/remove-legacy-facts branch from b2cc959 to 1deec79 Compare January 26, 2021 15:45
@GabrielNagy
Copy link
Contributor Author

jenkins please test this on all

@GabrielNagy GabrielNagy marked this pull request as ready for review January 28, 2021 16:07
@GabrielNagy GabrielNagy requested review from a team January 28, 2021 16:07
@GabrielNagy GabrielNagy force-pushed the PUP-10853/remove-legacy-facts branch from 1deec79 to bc6af4a Compare February 8, 2021 12:48
@GabrielNagy
Copy link
Contributor Author

jenkins please test this on all

@GabrielNagy GabrielNagy force-pushed the PUP-10853/remove-legacy-facts branch from bc6af4a to 4328a2f Compare February 18, 2021 16:15
As we're moving away from legacy facts we also need to bump the minimum
Facter version, since Facter 2 does not have structured facts, and
Facter 3 provides no API for accessing them in a dot-notation format.
Use structured facts instead of legacy OS facts. The following mapping
applies:

operatingsystem => os.name
osfamily => os.family
operatingsystemrelease => os.release.full
operatingsystemmajrelease => os.release.major
lsbdistrelease => os.distro.release.full
macosx_productversion_major => os.macosx.version.major
Use structured facts instead of legacy networking facts. The following
mapping applies:

fqdn => networking.fqdn
domain => networking.domain
hostname => networking.hostname
ipaddress => networking.ip
ipaddress6 => networking.ip6

Change `processorcount` to `processors.count`.
@GabrielNagy GabrielNagy force-pushed the PUP-10853/remove-legacy-facts branch from f280c44 to b992851 Compare February 23, 2021 13:05
@gimmyxd
Copy link
Contributor

gimmyxd commented Feb 25, 2021

jenkins please test this on all

@gimmyxd gimmyxd merged commit 8660b32 into puppetlabs:main Feb 25, 2021
GabrielNagy added a commit to GabrielNagy/puppet that referenced this pull request Mar 10, 2021
…/remove-legacy-facts"

This reverts commit 8660b32, reversing
changes made to c6412ea.

This also sneakily reverts e972610 by
switching back to using legacy facts.

When/If we decide to reintroduce this functionality, it should be enough
to revert this revert.
mihaibuzgau added a commit that referenced this pull request Mar 10, 2021
…acy-facts

Revert "Merge pull request #8492 from GabrielNagy/PUP-10853/remove-le…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants