fix synchronizer throwing exceptions from vtn recipe
diff --git a/xos/synchronizers/base/ansible.py b/xos/synchronizers/base/ansible.py
index d2dca3b..5135971 100644
--- a/xos/synchronizers/base/ansible.py
+++ b/xos/synchronizers/base/ansible.py
@@ -34,11 +34,20 @@
if (l.startswith(magic_str)):
w = len(magic_str)
str = l[w:]
+
+ # handle ok: [127.0.0.1] => (item=org.onosproject.driver) => {...
+ if str.startswith("(") and (" => {" in str):
+ str = str.split("=> ",1)[1]
+
d = json.loads(str)
results.append(d)
elif (l.startswith(magic_str2)):
w = len(magic_str2)
str = l[w:]
+
+ if str.startswith("(") and (" => {" in str):
+ str = str.split("=> ",1)[1]
+
d = json.loads(str)
results.append(d)