mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 22:33:25 +00:00
Merge pull request #1926 from akerl/requiredcheck
fixed check for required_together
This commit is contained in:
@@ -481,7 +481,7 @@ class AnsibleModule(object):
|
|||||||
if spec is None:
|
if spec is None:
|
||||||
return
|
return
|
||||||
for check in spec:
|
for check in spec:
|
||||||
counts = [ self.count_terms([field]) for field in check ]
|
counts = [ self._count_terms([field]) for field in check ]
|
||||||
non_zero = [ c for c in counts if c > 0 ]
|
non_zero = [ c for c in counts if c > 0 ]
|
||||||
if len(non_zero) > 0:
|
if len(non_zero) > 0:
|
||||||
if 0 in counts:
|
if 0 in counts:
|
||||||
|
|||||||
Reference in New Issue
Block a user