diff --git a/.vagrant-puppet/modules/icinga2-mysql/manifests/init.pp b/.vagrant-puppet/modules/icinga2-mysql/manifests/init.pp index a336e0816..0e481eb1c 100644 --- a/.vagrant-puppet/modules/icinga2-mysql/manifests/init.pp +++ b/.vagrant-puppet/modules/icinga2-mysql/manifests/init.pp @@ -1,6 +1,10 @@ class icinga2-mysql { include icinga-packages - include icinga2 + + package { 'icinga2-ido-mysql': + ensure => latest, + require => Class['icinga-packages'], + } mysql::database::populate { 'icinga2': username => 'icinga2', @@ -10,27 +14,16 @@ class icinga2-mysql { require => Package['icinga2-ido-mysql'], } - icinga2::feature { 'ido-mysql': - require => Mysql::Database::Populate['icinga2'], - } - - package { 'icinga2-ido-mysql': - ensure => latest, - require => Class['icinga-packages'], - } - file { '/etc/icinga2/features-available/ido-mysql.conf': source => 'puppet:///modules/icinga2-mysql/etc/icinga2/features-available/ido-mysql.conf', owner => 'icinga', group => 'icinga', - notify => Service['icinga2'], } - file { '/etc/icinga2/features-enabled/ido-mysql.conf': - ensure => 'link', - target => '/etc/icinga2/features-available/ido-mysql.conf', - owner => 'root', - group => 'root', - require => Package['icinga2-ido-mysql'], + icinga2::feature { 'ido-mysql': + require => [ + Mysql::Database::Populate['icinga2'], + File['/etc/icinga2/features-available/ido-mysql.conf'] + ], } }