diff --git a/lib/ansible/utils.py b/lib/ansible/utils.py index 1f7c9e85bb6..a29f7ea2542 100644 --- a/lib/ansible/utils.py +++ b/lib/ansible/utils.py @@ -182,7 +182,12 @@ def parse_json(data): # not JSON, but try "Baby JSON" which allows many of our modules to not # require JSON and makes writing modules in bash much simpler results = {} - tokens = shlex.split(data) + try : + tokens = shlex.split(data) + except: + print "failed to parse json: "+ data + raise; + for t in tokens: if t.find("=") == -1: raise errors.AnsibleError("failed to parse: %s" % data)