From 50be9a97bf695fb7b5c038a38411096ac6f88f5b Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Tue, 2 Jul 2024 11:30:36 -0400 Subject: [PATCH] Update lib/ansible/playbook/task.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) --- lib/ansible/playbook/task.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/ansible/playbook/task.py b/lib/ansible/playbook/task.py index 5155a734732..982b02b8f03 100644 --- a/lib/ansible/playbook/task.py +++ b/lib/ansible/playbook/task.py @@ -456,13 +456,8 @@ class Task(Base, Conditional, Taggable, CollectionSearch, Notifiable, Delegatabl self._parent.set_loader(loader) def get_parent_block_name(self): - - name = '' parent_block = self.get_first_parent_block(static=True) - if parent_block: - name = getattr(parent_block, 'name', '') - - return name + return getattr(parent_block, 'name', '') def _get_parent_attribute(self, attr, omit=False): '''