mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-27 21:01:27 -07:00
Swap default for INVALID_TASK_ATTRIBUTE_FAILED to True, add additional info to exception (#44138)
This commit is contained in:
parent
0beaea22a4
commit
509e92ef72
2 changed files with 9 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue