Skip to content

Commit 0c7964f

Browse files
authored
has_key was deprecated since Puppet 4.0.0
puppetlabs/puppetlabs-stdlib#1319
1 parent 48cc304 commit 0c7964f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

manifests/params.pp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@
44
$sleep_interval = 1
55
$update_interval = 10
66

7-
if has_key($facts, 'tuned_version') and $facts['tuned_version'] =~ /^(\d+)\.[\d\.]+$/ {
7+
$my_hash = {'key_one' => 'value_one'}
8+
if 'key_one' in $my_hash {
9+
notice('this will be printed')
10+
}
11+
if 'tuned_version' in $facts and $facts['tuned_version'] =~ /^(\d+)\.[\d\.]+$/ {
812
$_majversion = $1
913
} else {
1014
$_majversion = undef

0 commit comments

Comments
 (0)