|
|
@ -41,9 +41,13 @@ 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']:
|
|
|
|
if type(self._task.args['var']) in (list, dict):
|
|
|
|
results = "VARIABLE IS NOT DEFINED!"
|
|
|
|
# If var is a list or dict, use the type as key to display
|
|
|
|
result[self._task.args['var']] = results
|
|
|
|
result[str(type(self._task.args['var']))] = results
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
if results == self._task.args['var']:
|
|
|
|
|
|
|
|
results = "VARIABLE IS NOT DEFINED!"
|
|
|
|
|
|
|
|
result[self._task.args['var']] = results
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
result['msg'] = 'here we are'
|
|
|
|
result['msg'] = 'here we are'
|
|
|
|
|
|
|
|
|
|
|
|