Check vars against Mapping in DEBUG (#66355)

When ANSIBLE_DEBUG=1, vars are VarsWithSources now which is a Mapping.
Check vars against Mapping instead of dict.
This commit is contained in:
Martin Krizek 2020-01-13 10:04:32 +01:00 committed by GitHub
parent b070fd1630
commit b7dfcfa0b4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -506,8 +506,8 @@ class Templar:
are being changed.
'''
if not isinstance(variables, dict):
raise AnsibleAssertionError("the type of 'variables' should be a dict but was a %s" % (type(variables)))
if not isinstance(variables, Mapping):
raise AnsibleAssertionError("the type of 'variables' should be a Mapping but was a %s" % (type(variables)))
self._available_variables = variables
self._cached_result = {}