From f8d16220ffe5a92ddff8cdcd1e53d1009de241f1 Mon Sep 17 00:00:00 2001 From: Jon-Paul Lindquist Date: Tue, 1 Aug 2023 16:37:37 -0700 Subject: [PATCH 1/2] Update type compatibility with stdlib 9.x --- manifests/init.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/init.pp b/manifests/init.pp index f18a2b2..6e587d9 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -5,7 +5,7 @@ Integer $sleep_interval = $tuned::params::sleep_interval, Integer $update_interval = $tuned::params::update_interval, String $majversion = $tuned::params::majversion, - Variant[Stdlib::Compat::Absolute_path, String[0,0]] $main_conf = $tuned::params::main_conf, + Variant[Stdlib::Absolutepath, String[0,0]] $main_conf = $tuned::params::main_conf, Stdlib::Absolutepath $profiles_path = $tuned::params::profiles_path, String $active_profile_conf = $tuned::params::active_profile_conf, Array[String, 1] $packages = $tuned::params::packages, From d91ba9cfebe6f92ca27d7e00bcf546d8fb312525 Mon Sep 17 00:00:00 2001 From: Jon-Paul Lindquist Date: Tue, 1 Aug 2023 16:54:02 -0700 Subject: [PATCH 2/2] Replace deprecated has_key function --- manifests/params.pp | 2 +- manifests/profile/script.pp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/manifests/params.pp b/manifests/params.pp index bb6d6bf..c7607f2 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -4,7 +4,7 @@ $sleep_interval = 1 $update_interval = 10 - if has_key($facts, 'tuned_version') and $facts['tuned_version'] =~ /^(\d+)\.[\d\.]+$/ { + if 'tuned_version' in $facts and $facts['tuned_version'] =~ /^(\d+)\.[\d\.]+$/ { $_majversion = $1 } else { $_majversion = undef diff --git a/manifests/profile/script.pp b/manifests/profile/script.pp index d1876d3..6b4be98 100644 --- a/manifests/profile/script.pp +++ b/manifests/profile/script.pp @@ -4,7 +4,7 @@ Hash[String, String] $scripts, Pattern[/^[\w\-\.]+$/] $script_name = $title, ) { - unless has_key($scripts, $script_name) { + unless $script_name in $scripts { fail("Missing content for script ${script_name}") }