]> granicus.if.org Git - icinga2/commitdiff
Refactor puppet module 'icinga-web'.
authorMichael Friedrich <Michael.Friedrich@netways.de>
Sat, 4 Jan 2014 12:34:29 +0000 (13:34 +0100)
committerMichael Friedrich <Michael.Friedrich@netways.de>
Sat, 4 Jan 2014 12:34:29 +0000 (13:34 +0100)
Fixes #5414

.vagrant-puppet/manifests/default.pp
.vagrant-puppet/modules/icinga-web/manifests/init.pp
.vagrant-puppet/modules/icinga2-icinga-web/manifests/init.pp [new file with mode: 0644]

index 776a46f01429e3151391b47d987c7137922b9ad3..704044ac24c9809776bfed18eeaf906626db67d9 100644 (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
 
index 379ce63986ae02b0eb24f37f0f6a348f54c16062..ab86121bf7cb862e3463e72fe5341cf9ce94ef8a 100644 (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']
-  }
-
 }
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 (file)
index 0000000..1547b97
--- /dev/null
@@ -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']
+  }
+}