Skip to content

Commit 2605e30

Browse files
authored
Merge pull request #969 from bugfood/missing-command
add a workaround for rabbitmq_vhost when running with --noop or --tags
2 parents 175d556 + f8bd2d8 commit 2605e30

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/puppet/provider/rabbitmq_vhost/rabbitmqctl.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ def self.prefetch(resources)
1919
# we only deal with vhost metadata >= version 3.11.0
2020
def self.supports_metadata?
2121
Puppet::Util::Package.versioncmp(rabbitmq_version, '3.11') >= 0
22+
rescue Puppet::MissingCommand
23+
# See comment on the definition of rabbitmqctl_list in rabbitmqctl_cli.rb;
24+
# the same rationale applies here.
25+
Puppet.debug('supports_metadata?: rabbitmqctl command not found; assuming rabbitmq is not installed')
26+
false
2227
end
2328

2429
def supports_metadata?

0 commit comments

Comments
 (0)