mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 11:21:25 -07:00
Simplify the way the debug: var=varname plugin works.
This commit is contained in:
parent
a078184ae8
commit
bbf212a268
2 changed files with 4 additions and 6 deletions
|
@ -49,9 +49,11 @@ class ActionModule(object):
|
|||
else:
|
||||
result = dict(msg=args['msg'])
|
||||
elif 'var' in args:
|
||||
results = utils.safe_eval(args['var'], inject, include_exceptions=True, template_call=True)
|
||||
|
||||
results = utils.safe_eval(args['var'], inject, include_exceptions=True)
|
||||
intermediate = results[0]
|
||||
exception = results[1]
|
||||
print exception
|
||||
if exception is not None:
|
||||
intermediate = "failed to evaluate: %s" % str(exception)
|
||||
result[args['var']] = intermediate
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue