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

drop legacy is_hash method, replace topscope fact with facts hash #107

Merged
merged 1 commit into from
Mar 30, 2018

Conversation

james-powis
Copy link
Member

@james-powis james-powis commented Jan 10, 2017

the $::os fact hash has been around since 3.5 (and puppet 3 is EOL) this change removes the is_hash dependency provided by stdlib (which is deprecated).

Supporting references:
https://github.com/puppetlabs/puppetlabs-stdlib#is_hash

Replacements for the is_ functions:
In param block: https://github.com/puppetlabs/puppetlabs-ntp/blob/master/manifests/init.pp#L17-L28
In code block: https://docs.puppet.com/puppet/4.8/lang_expressions.html#regex-or-data-type-match

Note: both of the replacements for is_* are only compatible with puppet 4.0.0 and later, I have updated the metadata.json to reflect this, and I would recommend releasing a new major release version to the forge.

@tobru
Copy link
Contributor

tobru commented Jan 12, 2017

Thanks for your PR. We're not yet ready to deprecate Puppet 3 support, this will happen over the next weeks.

} else {
$releasever = $::operatingsystemmajrelease
}
$releasever = $::os[release][major]
Copy link
Member

Choose a reason for hiding this comment

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

this should be $facts['os']['release']['major']

@bastelfreak
Copy link
Member

@james-powis thanks for the PR, can you please rebase?

@bastelfreak bastelfreak added needs-docs needs-rebase needs-work not ready to merge just yet and removed needs-docs labels Mar 30, 2018
@james-powis james-powis force-pushed the remove_hash_check branch 5 times, most recently from c5aa197 to 2504c90 Compare March 30, 2018 15:29
remove support for < 4.0.0
@james-powis
Copy link
Member Author

@bastelfreak Done and done, we should be good to go... as $::operatingsystemmajrelease is legacy status, I reverted the changes which were introduced in 3fa7b17 which 80% covered this PR.

@bastelfreak
Copy link
Member

Thanks!

@bastelfreak bastelfreak merged commit beba0a6 into voxpupuli:master Mar 30, 2018
@bastelfreak bastelfreak changed the title removing unneeded fact evaluation drop legacy is_hash method, replace topscope fact with facts hash Mar 30, 2018
@bastelfreak bastelfreak added enhancement New feature or request and removed needs-rebase needs-work not ready to merge just yet labels Mar 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants