1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

now combine vars errors dump vars

very hard to debug w/o knowing what vars were being merged at the time of the error
This commit is contained in:
Brian Coca 2016-01-14 10:23:35 -05:00
parent b1a56051bd
commit 9d1b280689

View file

@ -20,7 +20,7 @@ from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import ast
from json import JSONEncoder
from json import dumps
from collections import MutableMapping
from ansible.compat.six import iteritems, string_types
@ -43,9 +43,9 @@ def _validate_mutable_mappings(a, b):
# a variable number of arguments instead.
if not (isinstance(a, MutableMapping) and isinstance(b, MutableMapping)):
raise AnsibleError("failed to combine variables, expected dicts but"
" got a '{0}' and a '{1}'".format(
a.__class__.__name__, b.__class__.__name__))
raise AnsibleError("failed to combine variables, expected dicts but got a '{0}' and a '{1}': \n{2}\n{3}".format(
a.__class__.__name__, b.__class__.__name__, dumps(a), dumps(b))
)
def combine_vars(a, b):
"""