diff --git a/lib/ansible/modules/messaging/rabbitmq/rabbitmq_parameter.py b/lib/ansible/modules/messaging/rabbitmq/rabbitmq_parameter.py index ccccd4eb1b..551ffcf708 100644 --- a/lib/ansible/modules/messaging/rabbitmq/rabbitmq_parameter.py +++ b/lib/ansible/modules/messaging/rabbitmq/rabbitmq_parameter.py @@ -78,7 +78,7 @@ class RabbitMqParameter(object): if not self.module.check_mode or (self.module.check_mode and run_in_check_mode): cmd = [self._rabbitmqctl, '-q', '-n', self.node] rc, out, err = self.module.run_command(cmd + args, check_rc=True) - return out.splitlines() + return out.strip().splitlines() return list() def get(self):