Inject vars need to pushed further up to make with_items work as desired.

This commit is contained in:
Michael DeHaan 2012-07-17 20:08:45 -04:00
commit 8bb8314d10
2 changed files with 19 additions and 15 deletions

View file

@ -95,10 +95,6 @@ class Task(object):
# process with_items so it can be used by Runner code
if self.with_items is None:
self.with_items = [ ]
elif isinstance(self.with_items, basestring):
self.with_items = utils.varLookup(self.with_items, self.module_vars)
if type(self.with_items) != list:
raise errors.AnsibleError("with_items must be a list, got: %s" % self.with_items)
self.module_vars['items'] = self.with_items
# tags allow certain parts of a playbook to be run without running the whole playbook