lookup templated value of a var (#32772)

* lookup templated value of a var
* better dupe loop detection
* corrected invalid test loops
This commit is contained in:
Brian Coca
2017-12-19 23:41:50 -05:00
committed by Adam Miller
parent bc91258124
commit 2db3d861e0
4 changed files with 103 additions and 3 deletions

View File

@@ -214,7 +214,7 @@ class Task(Base, Conditional, Taggable, Become):
if k in ('action', 'local_action', 'args', 'delegate_to') or k == action or k == 'shell':
# we don't want to re-assign these values, which were determined by the ModuleArgsParser() above
continue
elif k.replace("with_", "") in lookup_loader:
elif k.startswith('with_') and k.replace("with_", "") in lookup_loader:
# transform into loop property
self._preprocess_with_loop(ds, new_ds, k, v)
else: