| Puppet Version: 6.13.0 Puppet Server Version: 6.9.0 OS Name/Version: Debian 10 (Buster) Consider the following code:
class test_notify { |
$a = ['a', 'b', 'c'] |
$b = {'a' => 1, 'b' => 2, 'c' => 3 } |
notify { |
'Array': |
message => $a, |
; |
'Hash': |
message => $b, |
; |
} |
} |
Desired Behavior: I was expecting this:
Notice: ["a", "b", "c"] |
Notice: /Stage[main]/Test_notify/Notify[Array]/message: defined 'message' as ['a', 'b', 'c'] |
Notice: {"a"=>1, "b"=>2, "c"=>3} |
Notice: /Stage[main]/Test_notify/Notify[Hash]/message: defined 'message' as { |
'a' => 1, |
'b' => 2, |
'c' => 3 |
} |
That is to say I was expecting that the 'message' attribute to behave in the same way for Array and Hash values. Actual Behavior: But instead, 'notify' resource only displays the first element of the array, silently ignoring all the others:
Notice: a |
Notice: /Stage[main]/Test_notify/Notify[Array]/message: defined 'message' as 'a' |
Notice: {"a"=>1, "b"=>2, "c"=>3} |
Notice: /Stage[main]/Test_notify/Notify[Hash]/message: defined 'message' as { |
'a' => 1, |
'b' => 2, |
'c' => 3 |
} |
|
With a Hash value, the 'notify' resource displays all the Hash. |