Make undefined variables in debug var=foo more obvious

Fixes #9935
pull/11464/head
James Cammarata 10 years ago
parent b6c52ce115
commit 2e386deeae

@ -35,6 +35,8 @@ class ActionModule(ActionBase):
# FIXME: move the LOOKUP_REGEX somewhere else # FIXME: move the LOOKUP_REGEX somewhere else
elif 'var' in self._task.args: # and not utils.LOOKUP_REGEX.search(self._task.args['var']): elif 'var' in self._task.args: # and not utils.LOOKUP_REGEX.search(self._task.args['var']):
results = self._templar.template(self._task.args['var'], convert_bare=True) results = self._templar.template(self._task.args['var'], convert_bare=True)
if results == self._task.args['var']:
results = "VARIABLE IS NOT DEFINED!"
result = dict() result = dict()
result[self._task.args['var']] = results result[self._task.args['var']] = results
else: else:

Loading…
Cancel
Save