diff --git a/changelogs/fragments/79376-replace-valid-attrs-with-fattributes.yaml b/changelogs/fragments/79376-replace-valid-attrs-with-fattributes.yaml new file mode 100644 index 00000000000..da53c674424 --- /dev/null +++ b/changelogs/fragments/79376-replace-valid-attrs-with-fattributes.yaml @@ -0,0 +1,2 @@ +bugfixes: + - Fixes leftover _valid_attrs usage. diff --git a/lib/ansible/playbook/task.py b/lib/ansible/playbook/task.py index 50ac5df7f48..6a9136d2541 100644 --- a/lib/ansible/playbook/task.py +++ b/lib/ansible/playbook/task.py @@ -244,7 +244,7 @@ class Task(Base, Conditional, Taggable, CollectionSearch): elif k.startswith('with_') and k.removeprefix("with_") in lookup_loader: # transform into loop property self._preprocess_with_loop(ds, new_ds, k, v) - elif C.INVALID_TASK_ATTRIBUTE_FAILED or k in self._valid_attrs: + elif C.INVALID_TASK_ATTRIBUTE_FAILED or k in self.fattributes: new_ds[k] = v else: display.warning("Ignoring invalid attribute: %s" % k)