]> granicus.if.org Git - icinga2/commitdiff
Vagrant: Install icinga-web-mysql.
authorGunnar Beutner <gunnar@beutner.name>
Wed, 16 Oct 2013 19:11:49 +0000 (21:11 +0200)
committerGunnar Beutner <gunnar@beutner.name>
Wed, 16 Oct 2013 19:11:49 +0000 (21:11 +0200)
.vagrant-puppet/modules/icinga-web/manifests/init.pp
.vagrant-puppet/modules/icinga2/manifests/init.pp

index 4d1483600cc027c4707315ea814afbc2132107aa..d017ae9477ce8732bf3a48275d29622558fcf818 100644 (file)
@@ -13,12 +13,16 @@ class icinga-web {
     notify => Service['apache']
   }
 
+  package { 'icinga-web-mysql':
+    ensure => installed,
+    require => Class['icinga-rpm-snapshot'],
+    notify => Service['apache']
+  }
+
   exec { 'create-mysql-icinga-web-db':
     path => '/bin:/usr/bin:/sbin:/usr/sbin',
     unless => 'mysql -uicinga_web -picinga_web icinga_web',
-    command => 'mysql -uroot -e "CREATE DATABASE icinga_web; \
-               GRANT ALL ON icinga_web.* TO icinga_web@localhost \
-               IDENTIFIED BY \'icinga_web\';"',
+    command => 'mysql -uroot -e "CREATE DATABASE icinga_web; GRANT ALL ON icinga_web.* TO icinga_web@localhost IDENTIFIED BY \'icinga_web\';"',
     require => Service['mysqld']
   }
 
index 2b909e5fd46ea7bc510405897941edf1c0ca71f5..8e410678c4492f63ebc820d8b2b933a34e9d0d2c 100644 (file)
@@ -45,9 +45,7 @@ class icinga2-ido-mysql {
   exec { 'create-mysql-icinga2-ido-db':
     path => '/bin:/usr/bin:/sbin:/usr/sbin',
     unless => 'mysql -uicinga -picinga icinga',
-    command => 'mysql -uroot -e "CREATE DATABASE icinga; \
-               GRANT ALL ON icinga.* TO icinga@localhost \
-                IDENTIFIED BY \'icinga\';"',
+    command => 'mysql -uroot -e "CREATE DATABASE icinga; GRANT ALL ON icinga.* TO icinga@localhost IDENTIFIED BY \'icinga\';"',
     require => Service['mysqld']
   }