Sanitize ovs br-get-external-id output on openvswitch_bridge (#24209)

If a bridge does not have external_ids, ovs-vsctl returns '{}'.
This causes issues on the current want vs have comparison in cases
where the play does not define external_ids, as the comparison
is None vs '{}'.
pull/24205/head
Ricardo Carrillo Cruz 8 years ago committed by GitHub
parent e13fc5d6bd
commit e67eba877e

@ -117,14 +117,17 @@ from ansible.module_utils.six import iteritems
from ansible.module_utils.pycompat24 import get_exception
def _external_ids_to_dict(text):
d = {}
if not text:
return None
else:
d = {}
for l in text.splitlines():
if l:
k, v = l.split('=')
d[k] = v
for l in text.splitlines():
if l:
k, v = l.split('=')
d[k] = v
return d
return d
def map_obj_to_commands(want, have, module):
commands = list()

Loading…
Cancel
Save