module-icinga2/manifests/server/features/enable.pp
Steven Bambling a7caedcaa4 checking to make sure feature is available before enabling it
Signed-off-by: Nick Chappell <nick@intronic.org>
2014-10-09 23:12:20 -07:00

10 lines
445 B
Puppet

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