1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Also always post_validate Handler class as well

Fixes #12154
This commit is contained in:
James Cammarata 2015-09-01 10:56:22 -04:00
parent 12edbfeb0b
commit 3d282cd1b0

View file

@ -266,7 +266,7 @@ class Base:
continue
else:
raise AnsibleParserError("the field '%s' is required but was not set" % name)
elif not attribute.always_post_validate and self.__class__.__name__ not in ('Task', 'PlayContext'):
elif not attribute.always_post_validate and self.__class__.__name__ not in ('Task', 'Handler', 'PlayContext'):
# Intermediate objects like Play() won't have their fields validated by
# default, as their values are often inherited by other objects and validated
# later, so we don't want them to fail out early