Make `icinga2::feature' responsible for `icinga2::config'

refs #6842
This commit is contained in:
Alexander Klimov 2014-09-10 15:14:14 +02:00
parent 4008b86e33
commit a5b3601d44
2 changed files with 9 additions and 9 deletions

View File

@ -10,9 +10,15 @@
#
# icinga2::feature { 'example-feature'; }
#
define icinga2::feature {
define icinga2::feature ($source = undef) {
include icinga2
if $source != undef {
icinga2::config { "features-available/${name}":
source => $source,
}
}
file { "/etc/icinga2/features-enabled/${name}.conf":
ensure => link,
target => "/etc/icinga2/features-available/${name}.conf",

View File

@ -31,14 +31,8 @@ class icinga2_mysql {
require => Package['icinga2-ido-mysql'],
}
icinga2::config { 'features-available/ido-mysql':
source => 'puppet:///modules/icinga2_mysql',
}
icinga2::feature { 'ido-mysql':
require => [
Mysql::Database::Populate['icinga2'],
Icinga2::Config['features-available/ido-mysql'],
],
source => 'puppet:///modules/icinga2_mysql',
require => Mysql::Database::Populate['icinga2'],
}
}