mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
When inside an apt or yum task account for multiple conditionals. Fixes 4745.
This commit is contained in:
parent
d34a26e307
commit
8b2cd6413b
1 changed files with 5 additions and 0 deletions
|
@ -165,6 +165,11 @@ def is_changed(result):
|
|||
|
||||
def check_conditional(conditional, basedir, inject, fail_on_undefined=False, jinja2=False):
|
||||
|
||||
if isinstance(conditional, list):
|
||||
for x in conditional:
|
||||
if not check_conditional(x, basedir, inject, fail_on_undefined=fail_on_undefined, jinja2=jinja2):
|
||||
return False
|
||||
return True
|
||||
|
||||
if jinja2:
|
||||
conditional = "jinja2_compare %s" % conditional
|
||||
|
|
Loading…
Reference in a new issue