From 6059116a64afd4d53d82f846f9c3342ab21f9b7c Mon Sep 17 00:00:00 2001 From: Rabi Mishra Date: Tue, 15 Nov 2022 20:55:57 +0530 Subject: [PATCH] Replace _valid_attrs with fattributes (#79376) It was missed in one place it seems. --- .../fragments/79376-replace-valid-attrs-with-fattributes.yaml | 2 ++ lib/ansible/playbook/task.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/79376-replace-valid-attrs-with-fattributes.yaml 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)