Refactor puppet module 'icinga-web'.

Fixes #5414
This commit is contained in:
Michael Friedrich 2014-01-04 13:34:29 +01:00
parent baff566ccd
commit 6676bf058e
3 changed files with 19 additions and 16 deletions

View File

@ -1,6 +1,7 @@
include apache
include icinga2
include icinga2-classicui
include icinga-web
include icinga2-icinga-web
include nagios-plugins
include nsca-ng

View File

@ -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']
}
}

View File

@ -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']
}
}