mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Check that output from list_vhosts can be split (#37630)
As with list_users, list_vhosts can sometimes return a value that
doesn't contain a '\t' character. This appears to be the case if the
server has no vhosts, for example.
The same fix was applied to the rabbitmq_users module here:
fafb89cde5
This commit is contained in:
parent
6ad784bbbb
commit
fcbee7e40b
1 changed files with 3 additions and 0 deletions
|
@ -76,6 +76,9 @@ class RabbitMqVhost(object):
|
|||
vhosts = self._exec(['list_vhosts', 'name', 'tracing'], True)
|
||||
|
||||
for vhost in vhosts:
|
||||
if '\t' not in vhost:
|
||||
continue
|
||||
|
||||
name, tracing = vhost.split('\t')
|
||||
if name == self.name:
|
||||
self._tracing = self.module.boolean(tracing)
|
||||
|
|
Loading…
Reference in a new issue