diff --git a/lib/ansible/modules/extras/messaging/rabbitmq_plugin.py b/lib/ansible/modules/extras/messaging/rabbitmq_plugin.py index 8d3a942801..b52de337e2 100644 --- a/lib/ansible/modules/extras/messaging/rabbitmq_plugin.py +++ b/lib/ansible/modules/extras/messaging/rabbitmq_plugin.py @@ -88,7 +88,14 @@ class RabbitMqPlugins(object): return list() def get_all(self): - return self._exec(['list', '-E', '-m'], True) + list_output = self._exec(['list', '-E', '-m'], True) + plugins = [] + for plugin in list_output: + if not plugin: + break + plugins.append(plugin) + + return plugins def enable(self, name): self._exec(['enable', name]) @@ -96,6 +103,7 @@ class RabbitMqPlugins(object): def disable(self, name): self._exec(['disable', name]) + def main(): arg_spec = dict( names=dict(required=True, aliases=['name']),