Browse Source

Fix the exec resource commands so they use the new commands in 2.2 to enable/disable features instead of the old ones from 2.1 and before.

refs#7714 : https://dev.icinga.org/issues/7714
Nick Chappell 9 years ago
parent
commit
00cfa7abf8

+ 2 - 2
manifests/server/features/disable.pp

@@ -1,9 +1,9 @@
 # Disable Icinga 2 Features/Modules
 define icinga2::server::features::disable () {
-  exec { "icinga2-disable-feature ${name}":
+  exec { "icinga2 disable feature ${name}":
     user    => 'root',
     path    => '/usr/bin:/usr/sbin:/bin/:/sbin',
-    command => "/usr/sbin/icinga2-disable-feature ${name}",
+    command => "/usr/sbin/icinga2 disable feature ${name}",
     unless  => "[ ! -f /etc/icinga2/features-enabled/${name}.conf ]",
     require => Class['icinga2::server::install::packages'],
   }

+ 2 - 2
manifests/server/features/enable.pp

@@ -1,9 +1,9 @@
 # Enable Icinga 2 Features/Modules
 define icinga2::server::features::enable () {
-  exec { "icinga2-enable-feature ${name}":
+  exec { "icinga2 enable feature ${name}":
     user    => 'root',
     path    => '/usr/bin:/usr/sbin:/bin/:/sbin',
-    command => "/usr/sbin/icinga2-enable-feature ${name}",
+    command => "/usr/sbin/icinga2 enable feature ${name}",
     unless  => "[ ! -f /etc/icinga2/features-available/${name}.conf ] || [ -f /etc/icinga2/features-enabled/${name}.conf ]",
     require => Class['icinga2::server::install::packages'],
   }

+ 2 - 2
manifests/server/install.pp

@@ -149,7 +149,7 @@ class icinga2::server::install::execs inherits icinga2::server {
       exec { 'mysql_module_enable':
         user    => 'root',
         path    => '/usr/bin:/usr/sbin:/bin/:/sbin',
-        command => '/usr/sbin/icinga2-enable-feature ido-mysql && touch /etc/icinga2/mysql_module_loaded.txt',
+        command => '/usr/sbin/icinga2 enable feature ido-mysql && touch /etc/icinga2/mysql_module_loaded.txt',
         creates => '/etc/icinga2/mysql_module_loaded.txt',
         require => Exec['mysql_schema_load'],
       }
@@ -168,7 +168,7 @@ class icinga2::server::install::execs inherits icinga2::server {
       exec { 'postgres_module_enable':
         user    => 'root',
         path    => '/usr/bin:/usr/sbin:/bin/:/sbin',
-        command => '/usr/sbin/icinga2-enable-feature ido-pgsql && touch /etc/icinga2/postgres_module_loaded.txt',
+        command => '/usr/sbin/icinga2 enable feature ido-pgsql && touch /etc/icinga2/postgres_module_loaded.txt',
         creates => '/etc/icinga2/postgres_module_loaded.txt',
         require => Exec['postgres_schema_load'],
       }