features.pp 756 B

1234567891011121314151617181920212223
  1. # Enable Features for Icinga 2
  2. class icinga2::server::features (
  3. $enabled_features = $icinga2::server::server_enabled_features,
  4. $disabled_features = $icinga2::server::server_disabled_features,
  5. ) {
  6. include stdlib
  7. # Do some checking
  8. validate_array($enabled_features)
  9. validate_array($disabled_features)
  10. #Compare the enabled and disabled feature arrays
  11. #Remove enabled features that are also listed to be disabled
  12. $updated_enabled_features = difference($enabled_features,$disabled_features)
  13. #Pass the disabled features array to the define for looping
  14. icinga2::server::features::disable { $disabled_features: }
  15. #Pass the features array to the define for looping
  16. icinga2::server::features::enable { $updated_enabled_features: }
  17. }