mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 13:52:54 +00:00
Swap default for INVALID_TASK_ATTRIBUTE_FAILED to True, add additional info to exception (#44138)
This commit is contained in:
@@ -248,6 +248,13 @@ class Task(Base, Conditional, Taggable, Become):
|
||||
|
||||
return LoopControl.load(data=ds, variable_manager=self._variable_manager, loader=self._loader)
|
||||
|
||||
def _validate_attributes(self, ds):
|
||||
try:
|
||||
super(Task, self)._validate_attributes(ds)
|
||||
except AnsibleParserError as e:
|
||||
e.message += '\nThis error can be suppressed as a warning using the "invalid_task_attribute_failed" configuration'
|
||||
raise e
|
||||
|
||||
def post_validate(self, templar):
|
||||
'''
|
||||
Override of base class post_validate, to also do final validation on
|
||||
|
||||
Reference in New Issue
Block a user