mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 05:12:45 +00:00
Make sure role name doesn't end up in task name more than once
Fixes #11691
This commit is contained in:
@@ -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:
|
||||
if self._role and self.name and not self.name.startswith("%s :" % self._role.get_name()):
|
||||
return "%s : %s" % (self._role.get_name(), self.name)
|
||||
elif self.name:
|
||||
return self.name
|
||||
|
||||
Reference in New Issue
Block a user