1
0
Fork 0
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:
Michael DeHaan 2013-10-31 17:19:58 -04:00
parent d34a26e307
commit 8b2cd6413b

View file

@ -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