Package: puppet-module-puppetlabs-rabbitmq / 5.3.1-5

do-not-download-rabbitmqadmin-in-debian.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
Description: Do not download rabbitmqadmin in Debian
Author: Thomas Goirand <zigo@debian.org>
Forwarded: no
Last-Update: 2018-10-19

--- puppet-module-puppetlabs-rabbitmq-5.3.1.orig/lib/puppet/provider/rabbitmq_queue/rabbitmqadmin.rb
+++ puppet-module-puppetlabs-rabbitmq-5.3.1/lib/puppet/provider/rabbitmq_queue/rabbitmqadmin.rb
@@ -4,12 +4,12 @@ Puppet::Type.type(:rabbitmq_queue).provi
 
   if Puppet::PUPPETVERSION.to_f < 3
     commands :rabbitmqctl   => 'rabbitmqctl'
-    commands :rabbitmqadmin => '/usr/local/bin/rabbitmqadmin'
+    commands :rabbitmqadmin => '/usr/bin/rabbitmqadmin'
   else
     has_command(:rabbitmqctl, 'rabbitmqctl') do
       environment :HOME => "/tmp"
     end
-    has_command(:rabbitmqadmin, '/usr/local/bin/rabbitmqadmin') do
+    has_command(:rabbitmqadmin, '/usr/bin/rabbitmqadmin') do
       environment :HOME => "/tmp"
     end
   end
--- puppet-module-puppetlabs-rabbitmq-5.3.1.orig/manifests/init.pp
+++ puppet-module-puppetlabs-rabbitmq-5.3.1/manifests/init.pp
@@ -202,7 +202,9 @@ class rabbitmq(
   }
 
   if $admin_enable and $service_manage {
-    include '::rabbitmq::install::rabbitmqadmin'
+    if $::osfamily != 'Debian' {
+      include '::rabbitmq::install::rabbitmqadmin'
+    }
 
     rabbitmq_plugin { 'rabbitmq_management':
       ensure  => present,
@@ -210,8 +212,12 @@ class rabbitmq(
       notify  => Class['rabbitmq::service'],
     }
 
-    Class['::rabbitmq::service'] -> Class['::rabbitmq::install::rabbitmqadmin']
-    Class['::rabbitmq::install::rabbitmqadmin'] -> Rabbitmq_exchange<| |>
+    if $::osfamily == 'Debian' {
+      Class['::rabbitmq::service'] -> Rabbitmq_exchange<| |>
+    }else{
+      Class['::rabbitmq::service'] -> Class['::rabbitmq::install::rabbitmqadmin']
+      Class['::rabbitmq::install::rabbitmqadmin'] -> Rabbitmq_exchange<| |>
+    }
   }
 
   if $stomp_ensure {