mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Merge pull request #2592 from stoned/include-task-when
when: condition support for tasks include
This commit is contained in:
commit
5fef2ffb9d
1 changed files with 2 additions and 0 deletions
|
@ -206,6 +206,8 @@ class Play(object):
|
|||
items = utils.plugins.lookup_loader.get(plugin_name, basedir=self.basedir, runner=None).run(terms, inject=task_vars)
|
||||
elif k.startswith("when_"):
|
||||
included_additional_conditions.append(utils.compile_when_to_only_if("%s %s" % (k[5:], x[k])))
|
||||
elif k == 'when':
|
||||
included_additional_conditions.append(utils.compile_when_to_only_if("jinja2_compare %s" % x[k]))
|
||||
elif k in ("include", "vars", "only_if"):
|
||||
pass
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue