Make sure role name doesn't end up in task name more than once

Fixes #11691
This commit is contained in:
James Cammarata 2015-07-22 07:28:25 -04:00
parent b09f1f8e0b
commit 975172c1ef

View file

@ -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