mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-28 07:31:23 -07:00
Properly template task names
Also fixes in the correct way the bug in which the role name was incorrectly showing up twice in the task name. Fixes #10347
This commit is contained in:
parent
698479a623
commit
7bc789ba64
2 changed files with 7 additions and 2 deletions
|
@ -97,7 +97,7 @@ class Task(Base, Conditional, Taggable, Become):
|
|||
def get_name(self):
|
||||
''' return the name of the task '''
|
||||
|
||||
if self._role and self.name and not self.name.startswith("%s :" % self._role.get_name()):
|
||||
if self._role and self.name:
|
||||
return "%s : %s" % (self._role.get_name(), self.name)
|
||||
elif self.name:
|
||||
return self.name
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue