mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00: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:
@@ -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):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user