mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Use the -q argument to strip extraneous messages from rabbitmq
Instead of trying to do it ourselves and worrying about which version prints 'Listing vhosts...' and '...done' at the beginning or end of the output or not. Fixes #26592
This commit is contained in:
parent
df121d0cec
commit
098fb815af
@ -128,11 +128,9 @@ def list_vhosts(runas=None):
|
||||
'''
|
||||
if runas is None:
|
||||
runas = salt.utils.get_user()
|
||||
res = __salt__['cmd.run']('rabbitmqctl list_vhosts',
|
||||
runas=runas)
|
||||
|
||||
# remove first and last line: Listing ... - ...done
|
||||
return _strip_listing_to_done(res.splitlines())
|
||||
res = __salt__['cmd.run']('rabbitmqctl list_vhosts -q',
|
||||
runas=runas).splitlines()
|
||||
return res
|
||||
|
||||
|
||||
def user_exists(name, runas=None):
|
||||
|
Loading…
Reference in New Issue
Block a user