From 3c53e2f8ea67f7689c87beabafc86ecccdb38b8b Mon Sep 17 00:00:00 2001 From: Roman Bolshakov Date: Wed, 4 Apr 2018 16:49:01 +0300 Subject: [PATCH] openvswitch_db: Split key-value pairs correctly (#33335) Map values can contain commas, e.g. - name: Configure OVN bridge mapping openvswitch_db: state: present table: open_vswitch record: . col: external_ids key: ovn-bridge-mappings value: '"vmnet-static:br-vmnet-st,vmnet-dynamic:br-vmnet-dyn"' Previous behaviour was splitting the value and raised an exception. --- lib/ansible/modules/network/ovs/openvswitch_db.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/modules/network/ovs/openvswitch_db.py b/lib/ansible/modules/network/ovs/openvswitch_db.py index 95c3c8a1430..1dd75563d3e 100644 --- a/lib/ansible/modules/network/ovs/openvswitch_db.py +++ b/lib/ansible/modules/network/ovs/openvswitch_db.py @@ -127,7 +127,7 @@ def map_config_to_obj(module): col_value = match.group(3) col_value_to_dict = {} if col_value and col_value != '{}': - for kv in col_value[1:-1].split(','): + for kv in col_value[1:-1].split(', '): k, v = kv.split('=') col_value_to_dict[k.strip()] = v.strip()