From fcd6731113729aae953ceecead8f8ba3f746ac38 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Thu, 7 Dec 2017 11:28:42 -0500 Subject: [PATCH] report correct file for callback (cherry picked from commit d8509925264a2a0adbc4cb3af35dbe2284432280) --- CHANGELOG.md | 1 + lib/ansible/plugins/callback/__init__.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ec87a95a8..31508f7a30 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ Ansible Changes By Release * nxos_vrf_interface fix when validating the interface (https://github.com/ansible/ansible/issues/33227) * Fix for win_copy when sourcing files from an SMBv1 share (https://github.com/ansible/ansible/pull/33576) +* correctly report callback plugin file diff --git a/lib/ansible/plugins/callback/__init__.py b/lib/ansible/plugins/callback/__init__.py index 0376253a23..0dbcd57c4c 100644 --- a/lib/ansible/plugins/callback/__init__.py +++ b/lib/ansible/plugins/callback/__init__.py @@ -70,7 +70,7 @@ class CallbackBase(AnsiblePlugin): name = getattr(self, 'CALLBACK_NAME', 'unnamed') ctype = getattr(self, 'CALLBACK_TYPE', 'old') version = getattr(self, 'CALLBACK_VERSION', '1.0') - self._display.vvvv('Loading callback plugin %s of type %s, v%s from %s' % (name, ctype, version, __file__)) + self._display.vvvv('Loading callback plugin %s of type %s, v%s from %s' % (name, ctype, version, sys.modules[self.__module__].__file__)) self.disabled = False