mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 05:42:50 +00:00
This allows variable references in playbooks in a different way.
This commit is contained in:
@@ -49,7 +49,9 @@ class ActionModule(object):
|
||||
else:
|
||||
result = dict(msg=args['msg'])
|
||||
elif 'var' in args:
|
||||
(intermediate, exception) = utils.safe_eval(args['var'], inject, include_exceptions=True, template_call=True)
|
||||
results = utils.safe_eval(args['var'], inject, include_exceptions=True, template_call=True)
|
||||
intermediate = results[0]
|
||||
exception = results[1]
|
||||
if exception is not None:
|
||||
intermediate = "failed to evaluate: %s" % str(exception)
|
||||
result[args['var']] = intermediate
|
||||
|
||||
Reference in New Issue
Block a user