We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1cc2e54 commit e709ba7Copy full SHA for e709ba7
1 file changed
lib/puppet/provider/rabbitmq_user/rabbitmqctl.rb
@@ -111,6 +111,12 @@ def get_user_tags
111
match = rabbitmqctl('-q', 'list_users').split(/\n/).collect do |line|
112
line.match(/^#{Regexp.escape(resource[:name])}\s+\[(.*?)\]/)
113
end.compact.first
114
- Set.new(match[1].split(/, /)) if match
+ if match
115
+ # RabbitMQ 3.3.5 and up separate tags with ', '
116
+ # 3.3.4 just separates with space
117
+ # this splits by space and then strips word-final commas
118
+ # (if you're ending a valid tag name with a comma, why)
119
+ Set.new(match[1].split(' ')).map{|x| x.gsub(/,$/, '')}
120
+ end
121
end
122
0 commit comments