Adding tst inventory, ansible.cfg
This commit is contained in:
BIN
ansible/hooks/__pycache__/update_dashboard.cpython-38.pyc
Normal file
BIN
ansible/hooks/__pycache__/update_dashboard.cpython-38.pyc
Normal file
Binary file not shown.
23
ansible/hooks/update_dashboard.py
Normal file
23
ansible/hooks/update_dashboard.py
Normal file
@@ -0,0 +1,23 @@
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
from ansible.plugins.callback import CallbackBase
|
||||
|
||||
|
||||
class CallbackModule(CallbackBase):
|
||||
|
||||
CALLBACK_VERSION = 2.0
|
||||
CALLBACK_TYPE = 'stdout'
|
||||
CALLBACK_NAME = 'update_dashboard'
|
||||
|
||||
def v2_runner_on_ok(self, result):
|
||||
if result._task.action == 'debug':
|
||||
ansible_msg = result._result.get('msg', None)
|
||||
if ansible_msg:
|
||||
print(ansible_msg)
|
||||
|
||||
def v2_runner_on_unreachable(self, result):
|
||||
print("%s;UNREACHABLE" % result._host.get_name())
|
||||
|
||||
def v2_runner_on_failed(self, result, ignore_errors=False):
|
||||
print("%s;FAILED" % result._host.get_name())
|
||||
Reference in New Issue
Block a user