diff --git a/changelogs/fragments/lookup_rabbitmq-is_closing-bug.yml b/changelogs/fragments/lookup_rabbitmq-is_closing-bug.yml new file mode 100644 index 0000000000..57eac0175f --- /dev/null +++ b/changelogs/fragments/lookup_rabbitmq-is_closing-bug.yml @@ -0,0 +1,2 @@ +bugfixes: + - rabbitmq lookup plugin - Fix for rabbitmq lookups failing when using pika v1.0.0 and newer. diff --git a/lib/ansible/plugins/lookup/rabbitmq.py b/lib/ansible/plugins/lookup/rabbitmq.py index 2596359c9b..7c2745f41d 100644 --- a/lib/ansible/plugins/lookup/rabbitmq.py +++ b/lib/ansible/plugins/lookup/rabbitmq.py @@ -180,7 +180,7 @@ class LookupModule(LookupBase): else: break - if connection.is_closing or connection.is_closed: + if connection.is_closed: return [ret] else: try: