From 2f7d207d7a98dcd84b66d6531c7a7191291ddb9f Mon Sep 17 00:00:00 2001 From: Peter Sprygada Date: Mon, 29 Jan 2018 21:45:35 -0500 Subject: [PATCH] fixes error in dict_merge when merging list value (#35461) --- lib/ansible/module_utils/network/common/utils.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/ansible/module_utils/network/common/utils.py b/lib/ansible/module_utils/network/common/utils.py index 276d941cde..1ac6a996af 100644 --- a/lib/ansible/module_utils/network/common/utils.py +++ b/lib/ansible/module_utils/network/common/utils.py @@ -284,7 +284,11 @@ def dict_merge(base, other): if key in other: item = other.get(key) if item is not None: - combined[key] = list(set(chain(value, item))) + try: + combined[key] = list(set(chain(value, item))) + except TypeError: + value.extend([i for i in item if i not in value]) + combined[key] = value else: combined[key] = item else: