mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-27 07:01:22 -07:00
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 '{}'.
This commit is contained in:
parent
e13fc5d6bd
commit
e67eba877e
1 changed files with 9 additions and 6 deletions
|
@ -117,6 +117,9 @@ from ansible.module_utils.six import iteritems
|
||||||
from ansible.module_utils.pycompat24 import get_exception
|
from ansible.module_utils.pycompat24 import get_exception
|
||||||
|
|
||||||
def _external_ids_to_dict(text):
|
def _external_ids_to_dict(text):
|
||||||
|
if not text:
|
||||||
|
return None
|
||||||
|
else:
|
||||||
d = {}
|
d = {}
|
||||||
|
|
||||||
for l in text.splitlines():
|
for l in text.splitlines():
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue