enable.pp 446 B

12345678910
  1. # Enable Icinga 2 Features/Modules
  2. define icinga2::server::features::enable () {
  3. exec { "icinga2 enable feature ${name}":
  4. user => 'root',
  5. path => '/usr/bin:/usr/sbin:/bin/:/sbin',
  6. command => "/usr/sbin/icinga2 feature enable ${name}",
  7. unless => "[ ! -f /etc/icinga2/features-available/${name}.conf ] || [ -f /etc/icinga2/features-enabled/${name}.conf ]",
  8. require => Class['icinga2::server::install::packages'],
  9. }
  10. }