Adding existing playbooks and test files

This commit is contained in:
Sebastien Laithier
2022-08-18 10:18:28 +02:00
parent 5afc4b4049
commit 2b49288da1
9 changed files with 265 additions and 82 deletions

Binary file not shown.

23
hooks/update_dashboard.py Normal file
View 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())