puppet version: 4.9.4 hiera version: 3.3.1
What i am trying to do is have httpd reload when a new version of package-x/y is installed, and it doesn't seem like the array from Hiera is being passed correctly.
for my httpd.pp file, I have:
class service::common::httpd (
$service_state = undef, # undef = unmanaged
$service_run_at_boot = undef,
$packages = undef
) {
service { 'httpd':
ensure => $service_state,
enable => $service_run_at_boot,
subscribe => $packages,
restart => "/usr/sbin/apachectl graceful"
}
}
and in the yaml file for hiera, I have:
service::common::httpd::packages: [Package['package-x'],Package['package-y']]
running puppet with this gives the error
Error: Evaluation Error: Error while evaluating a Function Call, Lookup of key 'allow_virtual_packages' failed: Unable to parse (/root/repos/puppet-config/data/nodes/<location of yaml file>): did not find expected ',' or ']' while parsing a flow sequence
also saying that its missing a comma between flow collection entries
. I've tried many different combinations of spaces and commas as well..
I have also tried including the packages inside the class with an include statement.
What am i doing wrong?