INNER CODE UNIT · Python
CallbackModule
geerlingguy/raspberry-pi-dramble · testing/presentation/ansible-encounters/callback_plugins/tones.py:32
class CallbackModule(CallbackBase):
"""
makes Ansible much more exciting.
"""
CALLBACK_VERSION = 2.0
CALLBACK_TYPE = 'notification'
CALLBACK_NAME = 'tones'
CALLBACK_NEEDS_WHITELIST = True
def __init__(self):
super(CallbackModule, self).__init__()
self.synthesizer = distutils.spawn.find_executable('play')
# plugin disable itself if play is not present
# ansible will not call any callback if disabled is set to True
if not self.synthesizer: