{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/11411","labels_url":"https://api.github.com/repos/ansible/ansible/issues/11411/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/11411/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/11411/events","html_url":"https://github.com/ansible/ansible/issues/11411","id":91484956,"number":11411,"title":"Playbook relative callback_plugins not loaded","user":{"login":"sivel","id":39340,"avatar_url":"https://avatars.githubusercontent.com/u/39340?v=3","gravatar_id":"","url":"https://api.github.com/users/sivel","html_url":"https://github.com/sivel","followers_url":"https://api.github.com/users/sivel/followers","following_url":"https://api.github.com/users/sivel/following{/other_user}","gists_url":"https://api.github.com/users/sivel/gists{/gist_id}","starred_url":"https://api.github.com/users/sivel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sivel/subscriptions","organizations_url":"https://api.github.com/users/sivel/orgs","repos_url":"https://api.github.com/users/sivel/repos","events_url":"https://api.github.com/users/sivel/events{/privacy}","received_events_url":"https://api.github.com/users/sivel/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ansible/ansible/labels/bug_report","name":"bug_report","color":"fbca04"},{"url":"https://api.github.com/repos/ansible/ansible/labels/P2","name":"P2","color":"fad8c7"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/ansible/ansible/milestones/5","html_url":"https://github.com/ansible/ansible/milestones/v2","labels_url":"https://api.github.com/repos/ansible/ansible/milestones/5/labels","id":975800,"number":5,"title":"v2","description":null,"creator":{"login":"bcoca","id":836171,"avatar_url":"https://avatars.githubusercontent.com/u/836171?v=3","gravatar_id":"","url":"https://api.github.com/users/bcoca","html_url":"https://github.com/bcoca","followers_url":"https://api.github.com/users/bcoca/followers","following_url":"https://api.github.com/users/bcoca/following{/other_user}","gists_url":"https://api.github.com/users/bcoca/gists{/gist_id}","starred_url":"https://api.github.com/users/bcoca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcoca/subscriptions","organizations_url":"https://api.github.com/users/bcoca/orgs","repos_url":"https://api.github.com/users/bcoca/repos","events_url":"https://api.github.com/users/bcoca/events{/privacy}","received_events_url":"https://api.github.com/users/bcoca/received_events","type":"User","site_admin":false},"open_issues":66,"closed_issues":36,"state":"open","created_at":"2015-02-11T19:43:06Z","updated_at":"2015-06-30T11:19:41Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2015-06-27T15:48:27Z","updated_at":"2015-06-30T13:49:36Z","closed_at":null,"body":"In testing playbook relative `callback_plugins`, it looks like `push_basedir` is not called early enough.\r\n\r\n`TaskQueueManager._load_callbacks` is called before `Playbook._load_playbook_data`.  This prevents a playbook relative `callback_plugins` directory from functioning properly."},"comment":{"url":"https://api.github.com/repos/ansible/ansible/issues/comments/117190664","html_url":"https://github.com/ansible/ansible/issues/11411#issuecomment-117190664","issue_url":"https://api.github.com/repos/ansible/ansible/issues/11411","id":117190664,"user":{"login":"sivel","id":39340,"avatar_url":"https://avatars.githubusercontent.com/u/39340?v=3","gravatar_id":"","url":"https://api.github.com/users/sivel","html_url":"https://github.com/sivel","followers_url":"https://api.github.com/users/sivel/followers","following_url":"https://api.github.com/users/sivel/following{/other_user}","gists_url":"https://api.github.com/users/sivel/gists{/gist_id}","starred_url":"https://api.github.com/users/sivel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sivel/subscriptions","organizations_url":"https://api.github.com/users/sivel/orgs","repos_url":"https://api.github.com/users/sivel/repos","events_url":"https://api.github.com/users/sivel/events{/privacy}","received_events_url":"https://api.github.com/users/sivel/received_events","type":"User","site_admin":false},"created_at":"2015-06-30T13:49:36Z","updated_at":"2015-06-30T13:49:36Z","body":"@jimi-c LGTM.  Your new diff appears to work fine, except that in `SharedPluginLoaderObj.__init__` you have `self.basdirs` which is missing an `e` (should be `self.basedirs`)\r\n\r\nOutput:\r\n\r\n```\r\nCallbackModule.__init__\r\nCallbackModule.v2_playbook_on_play_start\r\n\r\nPLAY: ***************************************************************************\r\n\r\nTASK [test] *********************************************************************\r\nchanged: [localhost]\r\n\r\nPLAY RECAP **********************************************************************\r\nlocalhost                  : ok=1    changed=1    unreachable=0    failed=0\r\n```\r\n\r\nExample callback just for posterity:\r\n\r\n```\r\nfrom __future__ import (absolute_import, division, print_function)\r\n__metaclass__ = type\r\n\r\nfrom ansible.plugins.callback import CallbackBase\r\n\r\nclass CallbackModule(CallbackBase):\r\n    CALLBACK_VERSION = 2.0\r\n\r\n    def __init__(self, display):\r\n        super(CallbackModule, self).__init__(display)\r\n        self._display.display('CallbackModule.__init__')\r\n\r\n    def v2_playbook_on_play_start(self, play):\r\n        self._display.display('CallbackModule.v2_playbook_on_play_start')\r\n```"}}