def vhost_exists(name, runas=None):
 if ((runas is None) and (not salt.utils.is_windows())):
  runas = salt.utils.get_user()
 return (name in list_vhosts(runas=runas))

def vhost_exists ( name , runas = None ) : if ( ( runas is None ) and ( not salt . utils . is_windows ( ) ) ) : runas = salt . utils . get_user ( ) return ( name in list_vhosts ( runas = runas ) )
return whether the vhost exists based on rabbitmqctl list_vhosts .