mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 13:52:54 +00:00
Port ansible doc for plugins to use DOCUMENTATION variables
* Using docstrings conflicts with the standard use of docstrings * PYTHON_OPTIMIZE=2 will omit docstrings. Using docstrings makes future changes to the plugin and module code subject to the requirement that we ensure it won't be run with optimization.
This commit is contained in:
@@ -2,8 +2,10 @@
|
||||
# (c) 2017 Ansible Project
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
"""
|
||||
DOCUMENTATION:
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = """
|
||||
callback: selective
|
||||
callback_type: stdout
|
||||
requirements:
|
||||
@@ -26,21 +28,20 @@ DOCUMENTATION:
|
||||
- section: defaults
|
||||
- key: nocolor
|
||||
type: boolean
|
||||
EXAMPLES:
|
||||
"""
|
||||
|
||||
EXAMPLES = """
|
||||
- debug: msg="This will not be printed"
|
||||
- debug: msg="But this will"
|
||||
tags: [print_action]
|
||||
"""
|
||||
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
|
||||
import difflib
|
||||
|
||||
from ansible import constants as C
|
||||
from ansible.plugins.callback import CallbackBase
|
||||
from ansible.module_utils._text import to_text
|
||||
|
||||
__metaclass__ = type
|
||||
|
||||
DONT_COLORIZE = False
|
||||
COLORS = {
|
||||
|
||||
Reference in New Issue
Block a user