diff --git a/.vagrant-puppet/modules/icinga2/manifests/feature.pp b/.vagrant-puppet/modules/icinga2/manifests/feature.pp index 2aa01c431..97fd4cbce 100644 --- a/.vagrant-puppet/modules/icinga2/manifests/feature.pp +++ b/.vagrant-puppet/modules/icinga2/manifests/feature.pp @@ -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", diff --git a/.vagrant-puppet/modules/icinga2_mysql/manifests/init.pp b/.vagrant-puppet/modules/icinga2_mysql/manifests/init.pp index e82bf19c0..1ddc9440e 100644 --- a/.vagrant-puppet/modules/icinga2_mysql/manifests/init.pp +++ b/.vagrant-puppet/modules/icinga2_mysql/manifests/init.pp @@ -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'], } }