Remove duplicate compiling of task when: statements

Fixes #8538
release1.7.1
James Cammarata 10 years ago
parent 165572fbb8
commit d07107ab71

@ -561,12 +561,6 @@ class Play(object):
if 'vars' in x:
task_vars = utils.combine_vars(task_vars, x['vars'])
if 'when' in x:
if isinstance(x['when'], (basestring, bool)):
included_additional_conditions.append(x['when'])
elif isinstance(x['when'], list):
included_additional_conditions.extend(x['when'])
new_role = None
if 'role_name' in x:
new_role = x['role_name']

@ -300,6 +300,7 @@ class Task(object):
self.tags.extend(import_tags)
if additional_conditions:
new_conditions = additional_conditions
new_conditions.append(self.when)
new_conditions = additional_conditions[:]
if self.when:
new_conditions.append(self.when)
self.when = new_conditions

Loading…
Cancel
Save