summaryrefslogtreecommitdiff
path: root/lib/ansible
diff options
context:
space:
mode:
authorMatt Martz <matt@sivel.net>2021-04-04 21:13:39 -0500
committerGitHub <noreply@github.com>2021-04-04 21:13:39 -0500
commit1592c8b0fdca11af23256aa0aec7648c35f569cb (patch)
tree7b04b653ce5bf239122dfe9272d3467b2a82f2c0 /lib/ansible
parentf2d4f7344fd5d72af565450d814a888aec693c80 (diff)
downloadansible-1592c8b0fdca11af23256aa0aec7648c35f569cb.tar.gz
[stable-2.9] Ensure task from the worker is finalized/squashed (#73881) (#73929)
* Ensure task from the worker is finalized/squashed. Fixes #57399. Fixes #49942 (cherry picked from commit 832631b) Co-authored-by: Matt Martz <matt@sivel.net>
Diffstat (limited to 'lib/ansible')
-rw-r--r--lib/ansible/playbook/base.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/ansible/playbook/base.py b/lib/ansible/playbook/base.py
index 914425ff98..0f4dc4e430 100644
--- a/lib/ansible/playbook/base.py
+++ b/lib/ansible/playbook/base.py
@@ -545,6 +545,13 @@ class FieldAttributeBase(with_metaclass(BaseMeta, object)):
else:
setattr(self, attr, value)
+ # from_attrs is only used to create a finalized task
+ # from attrs from the Worker/TaskExecutor
+ # Those attrs are finalized and squashed in the TE
+ # and controller side use needs to reflect that
+ self._finalized = True
+ self._squashed = True
+
def serialize(self):
'''
Serializes the object derived from the base object into