mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
ignore empty lines in rabbitmqctl output (#43722)
* ignore empty lines in rabbitmqctl output this fixes a bug with rabbitmq 3.7.5 rabbitmqctl can return empty lines, breaking the rabbitmq_parameter module especially in a new vhost, the command rabbitmqctl list_parameters -q -p <vhost> will return an empty line * Strip empty line in rabbitmqctl output
This commit is contained in:
parent
af6427bf40
commit
faed1bbd96
1 changed files with 1 additions and 1 deletions
|
@ -78,7 +78,7 @@ class RabbitMqParameter(object):
|
||||||
if not self.module.check_mode or (self.module.check_mode and run_in_check_mode):
|
if not self.module.check_mode or (self.module.check_mode and run_in_check_mode):
|
||||||
cmd = [self._rabbitmqctl, '-q', '-n', self.node]
|
cmd = [self._rabbitmqctl, '-q', '-n', self.node]
|
||||||
rc, out, err = self.module.run_command(cmd + args, check_rc=True)
|
rc, out, err = self.module.run_command(cmd + args, check_rc=True)
|
||||||
return out.splitlines()
|
return out.strip().splitlines()
|
||||||
return list()
|
return list()
|
||||||
|
|
||||||
def get(self):
|
def get(self):
|
||||||
|
|
Loading…
Reference in a new issue