getting difference and not enabling services listed as disabled even if also listed as enabled
Signed-off-by: Nick Chappell <nick@intronic.org>
This commit is contained in:
parent
01e3430242
commit
50a07737ab
1 changed files with 7 additions and 1 deletions
|
@ -4,14 +4,20 @@ class icinga2::server::features (
|
|||
$disabled_features = $icinga2::server::server_disabled_features,
|
||||
) {
|
||||
|
||||
include stdlib
|
||||
|
||||
# Do some checking
|
||||
validate_array($enabled_features)
|
||||
validate_array($disabled_features)
|
||||
|
||||
#Compare the enabled and disabled feature arrays
|
||||
#Remove enabled features that are also listed to be disabled
|
||||
$updated_enabled_features = difference($enabled_features,$disabled_features)
|
||||
|
||||
#Pass the disabled features array to the define for looping
|
||||
icinga2::server::features::disable { $disabled_features: }
|
||||
|
||||
#Pass the features array to the define for looping
|
||||
icinga2::server::features::enable { $enabled_features: }
|
||||
icinga2::server::features::enable { $updated_enabled_features: }
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue