puppet-prod/site/profiles/manifests/packages.pp
Ben Vincent cc01259a64 feat: change packages to Hash
- change from multiple arrays for managing packages to a hash
- change to ensure_packages to prevent duplicate resource conflicts
2024-07-27 13:01:06 +10:00

20 lines
511 B
Puppet

# This class manages the installation of packages for the base profile
#
# Parameters:
# - $include: A hash of package names to be managed
# - $exclude: An array of package names to be removed from managed hash
#
class profiles::packages (
Hash $include = {},
Array[String] $exclude = [],
) {
# Filter the include hash to remove the packages listed in exclude
$filtered_include = filter($include) |$key, $value| {
!($key in $exclude)
}
# Manage packages
ensure_packages($filtered_include)
}