Skip to content
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

Fix use of legacy facts #1607

Merged
merged 1 commit into from
Jul 15, 2024
Merged

Fix use of legacy facts #1607

merged 1 commit into from
Jul 15, 2024

Conversation

silug
Copy link
Contributor

@silug silug commented Jul 15, 2024

Pull Request (PR) description

Replace legacy facts to improve compatibility with Puppet 8.

This Pull Request (PR) fixes the following issues

N/A

@silug silug marked this pull request as ready for review July 15, 2024 21:53
@silug
Copy link
Contributor Author

silug commented Jul 15, 2024

This fixes tests for #1606 for me.

@bastelfreak bastelfreak merged commit ba429c5 into voxpupuli:master Jul 15, 2024
27 checks passed
@bastelfreak bastelfreak added the bug Something isn't working label Jul 15, 2024
@silug silug deleted the legacy_facts branch July 15, 2024 22:46
@@ -2,7 +2,7 @@

Facter.add(:nginx_version) do
confine { Facter.value(:kernel) != 'windows' }
confine { Facter.value(:operatingsystem) != 'nexus' }
confine { Facter.value(:os)['name'] != 'nexus' }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can use

Suggested change
confine { Facter.value(:os)['name'] != 'nexus' }
confine { Facter.value('os'.name') != 'nexus' }

While it's probably safe to assume os is present and there's probably no (measurable) performance difference, but , it's still a good practice to learn.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants