Skip to content

Commit

Permalink
Merge 877f320 into 5818788
Browse files Browse the repository at this point in the history
  • Loading branch information
mbaldessari committed Jul 12, 2020
2 parents 5818788 + 877f320 commit 44fb271
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/facter/rabbitmq_nodename.rb
Expand Up @@ -2,7 +2,11 @@
setcode do
if Facter::Util::Resolution.which('rabbitmqctl')
rabbitmq_nodename = Facter::Core::Execution.execute('rabbitmqctl status 2>&1')
%r{^Status of node '?([\w\.\-]+@[\w\.\-]+)'?}.match(rabbitmq_nodename)[1]
begin
%r{^Status of node '?([\w\.\-]+@[\w\.\-]+)'?}.match(rabbitmq_nodename)[1]
rescue
Facter.debug("Error: rabbitmq_nodename facter failed. Output was #{rabbitmq_nodename}")
end
end
end
end

0 comments on commit 44fb271

Please sign in to comment.