initial project commit

This commit is contained in:
2023-11-30 13:00:40 -05:00
commit 0e79ee7089
5 changed files with 181 additions and 0 deletions

31
plugins/README.md Normal file
View File

@ -0,0 +1,31 @@
# Collections Plugins Directory
This directory can be used to ship various plugins inside an Ansible collection. Each plugin is placed in a folder that
is named after the type of plugin it is in. It can also include the `module_utils` and `modules` directory that
would contain module utils and modules respectively.
Here is an example directory of the majority of plugins currently supported by Ansible:
```
└── plugins
├── action
├── become
├── cache
├── callback
├── cliconf
├── connection
├── filter
├── httpapi
├── inventory
├── lookup
├── module_utils
├── modules
├── netconf
├── shell
├── strategy
├── terminal
├── test
└── vars
```
A full list of plugin types can be found at [Working With Plugins](https://docs.ansible.com/ansible-core/2.14/plugins/plugins.html).

View File

@ -0,0 +1,26 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from ansible.plugins.callback import CallbackBase
from ansible import constants as C
from ansible.utils.color import colorize, hostcolor
from ansible.utils.display import Display
class CallbackModule(CallbackBase):
CALLBACK_VERSION = 2.0
CALLBACK_TYPE = 'notification'
CALLBACK_NAME = 'job_status'
def __init__(self, *args, **kwargs):
super(CallbackModule, self).__init__()
def v2_playbook_on_start(self, playbook):
self._display.display("Custom commands for <v2_playbook_on_start> go here", color=C.COLOR_OK)
def v2_playbook_on_task_start(self, task, is_conditional):
self._display.display("Custom commands for <v2_playbook_on_task_start> go here", color=C.COLOR_OK)