From 72ebd1bf4639ef021e733b1f70cd7e113add0c37 Mon Sep 17 00:00:00 2001 From: Matt Martz Date: Mon, 7 May 2018 15:27:09 -0500 Subject: [PATCH] Add IncludeRole.get_name to provide better name for include_role. Fixes #36343 (#39807) --- lib/ansible/playbook/role_include.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/ansible/playbook/role_include.py b/lib/ansible/playbook/role_include.py index 9e09186bdb..3786d09b59 100644 --- a/lib/ansible/playbook/role_include.py +++ b/lib/ansible/playbook/role_include.py @@ -64,6 +64,10 @@ class IncludeRole(TaskInclude): self._role_name = None self._role_path = None + def get_name(self): + ''' return the name of the task ''' + return "%s : %s" % (self.action, self._role_name) + def get_block_list(self, play=None, variable_manager=None, loader=None): # only need play passed in when dynamic