From 0eca47cf91adc487af5250039381f9b468bbb258 Mon Sep 17 00:00:00 2001 From: Dag Wieers Date: Fri, 26 Feb 2016 15:03:51 +0100 Subject: [PATCH] Avoid merging a dict and a AnsibleUnicode This is the same fix we applied to v1.9 in PR #14565, however it does not fix #14678 completely ! The dictionaries are not being merged as tey are on v1.9. --- lib/ansible/utils/vars.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/utils/vars.py b/lib/ansible/utils/vars.py index 73ba52b4b39..01eb5ac8212 100644 --- a/lib/ansible/utils/vars.py +++ b/lib/ansible/utils/vars.py @@ -86,7 +86,7 @@ def merge_hash(a, b): for k, v in iteritems(b): # if there's already such key in a # and that key contains a MutableMapping - if k in result and isinstance(result[k], MutableMapping): + if k in result and isinstance(result[k], MutableMapping) and isinstance(v, MutableMapping): # merge those dicts recursively result[k] = merge_hash(result[k], v) else: