I've got a puppet manifest using an array to define some required packages to be installed by APT. I've also got some resource chaining occurring to specify dependencies (I don't want to use 'requires' or 'before' because it makes the code difficult to read. The problem is in the chaining line, the array gets expanded and breaks the chaining. I've followed the custom function workaround here Puppet Syntax: how to include an array of objects into an ordering -> chain? which works but seems a bit overkill to define a function.
$my_deps = ["autoconf", "automake1.9", "autotools-dev", "binutils"]
package { $my_deps:
ensure => installed,
}
exec {'c_update_apt':
command => '/usr/bin/apt-get update',
path => '/usr/bin/',
}
Exec['c_update_apt'] -> Package[ $my_deps ]
This errors saying 'Package[autoconf]Package[automake1.9].... not matched'. Any suggestions most appreciated.