mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-06 10:43:14 +00:00
added ability to use pure boolean in conditionals
This commit is contained in:
@@ -64,6 +64,10 @@ class Conditional:
|
||||
ds = getattr(self, '_ds')
|
||||
|
||||
try:
|
||||
# this allows for direct boolean assignments to conditionals "when: False"
|
||||
if isinstance(self.when, bool):
|
||||
return self.when
|
||||
|
||||
for conditional in self.when:
|
||||
if not self._check_conditional(conditional, templar, all_vars):
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user