mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
parent
e49c4e298f
commit
20957a1b85
2 changed files with 3 additions and 8 deletions
|
@ -563,12 +563,6 @@ class Play(object):
|
||||||
if 'vars' in x:
|
if 'vars' in x:
|
||||||
task_vars = utils.combine_vars(task_vars, x['vars'])
|
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
|
new_role = None
|
||||||
if 'role_name' in x:
|
if 'role_name' in x:
|
||||||
new_role = x['role_name']
|
new_role = x['role_name']
|
||||||
|
|
|
@ -300,6 +300,7 @@ class Task(object):
|
||||||
self.tags.extend(import_tags)
|
self.tags.extend(import_tags)
|
||||||
|
|
||||||
if additional_conditions:
|
if additional_conditions:
|
||||||
new_conditions = additional_conditions
|
new_conditions = additional_conditions[:]
|
||||||
|
if self.when:
|
||||||
new_conditions.append(self.when)
|
new_conditions.append(self.when)
|
||||||
self.when = new_conditions
|
self.when = new_conditions
|
||||||
|
|
Loading…
Reference in a new issue