Problem
-----------
Some versions of rabbitmq (v3.4.1) does not output any final
"...done" line in output of listings, but the given salt code
unconditionally removed the final line of output, which may
often result in inconsistent behavior of dependent state
functions, where the final line has a value that is significant.
Solution
-----------
This bugfix changes this output manipulation to be conditional,
matching only lines of ``"Listing ..."`` as the first, and
``"...done"`` as the last.
Details
---------
In my environment::
[rabbitmq@db01 ~]$ rabbitmqctl list_vhosts
Listing vhosts ...
/
This causes issues in, for example, a vhost is attempted to
be created for '/' that already exists, if that vhost happens
to be the last one listed in command output, it is thought
non-existent, resulting in state failure::
Failure: rabbitmq_vhost_|-rabbitmq-vhost_|-/_|-present: Creating vhost "/" ...
Error: vhost_already_exists: /