Hi,
is it possible to check if an array of packages is already installed before installing them or do I have to check them one by one like:
if ( ! defined ( Package['packagename'] ) ) {
package {
'packagename':
ensure => present;
}
}
I would like to do something like:
$array_of_packages = ['packagename1','packagename2','packagename3']
if ( ! defined ( Package [ $array_of_packages ] ) ) {
package { $array_of_packages:
ensure => present
}
}
If this is not supported is there a recommended way to check it (except one by one checking)?
Thanks in advance
↧