From 7cf363910ae128d259d3b7ed523fa8c911d36a04 Mon Sep 17 00:00:00 2001 From: Luca Berruti Date: Tue, 4 Mar 2014 18:20:01 +0100 Subject: [PATCH] fixes #6244 --- lib/ansible/runner/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/runner/__init__.py b/lib/ansible/runner/__init__.py index dfcd048792..7bbc9e372e 100644 --- a/lib/ansible/runner/__init__.py +++ b/lib/ansible/runner/__init__.py @@ -618,13 +618,13 @@ class Runner(object): all_failed = False results = [] for x in items: - # use a fresh inject for each item + # use a fresh inject for each item this_inject = inject.copy() this_inject['item'] = x # TODO: this idiom should be replaced with an up-conversion to a Jinja2 template evaluation if isinstance(self.complex_args, basestring): - complex_args = template.template(self.basedir, self.complex_args, inject, convert_bare=True) + complex_args = template.template(self.basedir, self.complex_args, this_inject, convert_bare=True) complex_args = utils.safe_eval(complex_args) if type(complex_args) != dict: raise errors.AnsibleError("args must be a dictionary, received %s" % complex_args)