Skip to content

Commit

Permalink
Update ensure_packages->stdlib::ensure_packages; require stdlib 9
Browse files Browse the repository at this point in the history
The `ensure_packages()` function is deprecated with stdlib 9. It
triggers a catalog compilation warning on Puppet 7 and a catgalog
compilation error on Pupppet 8. This PR switches to the successor,
`stdlib::ensure_packages()`. This function got introduced in stdlib 9.
  • Loading branch information
bastelfreak committed Mar 26, 2024
1 parent ed3e297 commit 258485b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion manifests/install.pp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# @api private
class dns::install {
if ! empty($dns::dns_server_package) {
ensure_packages([$dns::dns_server_package])
stdlib::ensure_packages([$dns::dns_server_package])
$pkg_req = Package[$dns::dns_server_package]
} else {
$pkg_req = undef
Expand Down
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
{
"name": "puppetlabs/stdlib",
"version_requirement": ">= 4.13.1 < 10.0.0"
"version_requirement": ">= 9.0.0 < 10.0.0"
}
],
"requirements": [
Expand Down

0 comments on commit 258485b

Please sign in to comment.