If I edit the script by adding mail() to the end, I receive a basic email immediately with no information when I run a job template (I believe this is expected).
The problem is I never receive a summary email when the job is complete. My assumption is this is supposed to wait around until the job is completed, then send an email. As expected, I never receive an email at all if I remove the mail() command I appended to the mail.py script.
Does anyone have any insight in getting this to work?
I added that function with the mail() call I was using beforehand. No dice. If I move that call to the bottom of the script, it sends the email. It behaves as if none of the Callback functions are working. This also applies to the hipchat.py plugin I’ve been trying.
I also I tried creating both a ‘v2_playbook_on_stats’ and ‘playbook_on_stats’ which didn’t change anything.
ERROR! Unexpected Exception: ‘CallbackModule’ object has no attribute ‘display’ the full traceback was: Traceback (most recent call last): File “/usr/bin/ansible-playbook”, line 86, in sys.exit(cli.run()) File “/usr/lib/pymodules/python2.7/ansible/cli/playbook.py”, line 150, in run results = pbex.run() File “/usr/lib/pymodules/python2.7/ansible/executor/playbook_executor.py”, line 79, in run self._tqm.load_callbacks() File “/usr/lib/pymodules/python2.7/ansible/executor/task_queue_manager.py”, line 173, in load_callbacks self._callback_plugins.append(callback_plugin()) File “/usr/lib/pymodules/python2.7/ansible/plugins/callback/hipchat.py”, line 70, in init self.display.warning('HipChat token could not be loaded. The HipChat ’ AttributeError: ‘CallbackModule’ object has no attribute ‘display’
I remember someone else ran into this with another plugin and it needed to be updated to v2 functions.
You should really not need to whitelist it unless it is shipped with ansible, only those modules have CALLBACK_NEEDS_WHITELIST = True, any custom modules should not have that setting unless you explicitly want to force people to whitelist them for them to work.