diff options
author | Manuel Sousa <manuel.sousa@gmail.com> | 2016-08-06 17:27:27 +0100 |
---|---|---|
committer | René Moser <mail@renemoser.net> | 2016-08-06 18:27:27 +0200 |
commit | 73a3cd6aebc85b0f0882b5aad2a83e2d61f54f80 (patch) | |
tree | 99685876c58d60fd06fadd2ca629364d0d9e0f26 | |
parent | 31a027e2cd68f78223d170fb82328f0de3b1abe4 (diff) | |
download | ansible-modules-extras-73a3cd6aebc85b0f0882b5aad2a83e2d61f54f80.tar.gz |
RabbitMQ-Binding - Allow empty routing key (#2674)
Fixes: #1985
-rw-r--r-- | messaging/rabbitmq_binding.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/messaging/rabbitmq_binding.py b/messaging/rabbitmq_binding.py index ad7fa151..2768095b 100644 --- a/messaging/rabbitmq_binding.py +++ b/messaging/rabbitmq_binding.py @@ -127,6 +127,11 @@ def main(): else: dest_type="e" + if module.params['routing_key'] == "": + props = "~" + else: + props = urllib.quote(module.params['routing_key'],'') + url = "http://%s:%s/api/bindings/%s/e/%s/%s/%s/%s" % ( module.params['login_host'], module.params['login_port'], @@ -134,7 +139,7 @@ def main(): urllib.quote(module.params['name'],''), dest_type, urllib.quote(module.params['destination'],''), - urllib.quote(module.params['routing_key'],'') + props ) # Check if exchange already exists |