mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Teach lookup plugins that if they can't evaluate something they can wait and do it later.
This commit is contained in:
parent
3f3b2a9448
commit
7a2d493e67
1 changed files with 4 additions and 0 deletions
|
@ -183,6 +183,10 @@ def _legacy_varFind(basedir, text, vars, lookup_fatal, depth, expand_lists):
|
|||
args = args.strip()
|
||||
# args have to be templated
|
||||
args = legacy_varReplace(basedir, args, vars, lookup_fatal, depth + 1, True)
|
||||
if isinstance(args, basestring) and args.find('$') != -1:
|
||||
# unable to evaluate something like $FILE($item) at this point, try to evaluate later
|
||||
return None
|
||||
|
||||
|
||||
instance = utils.plugins.lookup_loader.get(lookup_plugin_name.lower(), basedir=basedir)
|
||||
if instance is not None:
|
||||
|
|
Loading…
Reference in a new issue