- change from multiple arrays for managing packages to a hash - change to ensure_packages to prevent duplicate resource conflicts
20 lines
511 B
Puppet
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)
|
|
}
|