From: Michael Friedrich Date: Sat, 4 Jan 2014 12:34:29 +0000 (+0100) Subject: Refactor puppet module 'icinga-web'. X-Git-Tag: v0.0.7~55 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6676bf058e17348b75ba5353aa66f334c4f7694a;p=icinga2 Refactor puppet module 'icinga-web'. Fixes #5414 --- diff --git a/.vagrant-puppet/manifests/default.pp b/.vagrant-puppet/manifests/default.pp index 776a46f01..704044ac2 100644 --- a/.vagrant-puppet/manifests/default.pp +++ b/.vagrant-puppet/manifests/default.pp @@ -1,6 +1,7 @@ include apache +include icinga2 include icinga2-classicui -include icinga-web +include icinga2-icinga-web include nagios-plugins include nsca-ng diff --git a/.vagrant-puppet/modules/icinga-web/manifests/init.pp b/.vagrant-puppet/modules/icinga-web/manifests/init.pp index 379ce6398..ab86121bf 100644 --- a/.vagrant-puppet/modules/icinga-web/manifests/init.pp +++ b/.vagrant-puppet/modules/icinga-web/manifests/init.pp @@ -1,7 +1,5 @@ class icinga-web { include icinga-rpm-snapshot - include icinga2-ido-mysql - include icinga2-ido-pgsql include mysql php::extension { ['php-mysql']: @@ -37,17 +35,4 @@ class icinga-web { command => 'mysql -uicinga_web -picinga_web icinga_web < /usr/share/icinga-web/etc/schema/mysql.sql', require => [ Package['icinga-web'], Exec['create-mysql-icinga-web-db'] ] } - - exec { 'set-icinga2-cmd-pipe-path': - path => '/bin:/usr/bin:/sbin:/usr/sbin', - command => 'sed -i \'s/\/var\/spool\/icinga\/cmd\/icinga.cmd/\/var\/run\/icinga2\/cmd\/icinga2.cmd/g\' /etc/icinga-web/conf.d/access.xml', - require => Package['icinga-web'] - } - - exec { 'clear-config-cache': - path => '/bin:/usr/bin:/sbin:/usr/sbin', - command => '/usr/bin/icinga-web-clearcache', - require => Exec['set-icinga2-cmd-pipe-path'] - } - } diff --git a/.vagrant-puppet/modules/icinga2-icinga-web/manifests/init.pp b/.vagrant-puppet/modules/icinga2-icinga-web/manifests/init.pp new file mode 100644 index 000000000..1547b9720 --- /dev/null +++ b/.vagrant-puppet/modules/icinga2-icinga-web/manifests/init.pp @@ -0,0 +1,17 @@ +class icinga2-icinga-web { + include icinga-web + include icinga2-ido-mysql + include icinga2-ido-pgsql + + exec { 'set-icinga2-cmd-pipe-path': + path => '/bin:/usr/bin:/sbin:/usr/sbin', + command => 'sed -i \'s/\/var\/spool\/icinga\/cmd\/icinga.cmd/\/var\/run\/icinga2\/cmd\/icinga2.cmd/g\' /etc/icinga-web/conf.d/access.xml', + require => Package['icinga-web'] + } + + exec { 'clear-config-cache': + path => '/bin:/usr/bin:/sbin:/usr/sbin', + command => '/usr/bin/icinga-web-clearcache', + require => Exec['set-icinga2-cmd-pipe-path'] + } +}