mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-22 18:31:25 -07:00
[PR #9455/d887930e backport][stable-9] normalize docs in callback plugins (#9466)
normalize docs in callback plugins (#9455)
* normalize docs in callback plugins
Normalize doc blocks for plugins
* Apply suggestions from code review
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit d887930e49
)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
parent
015496fa9e
commit
6f3cfd3385
26 changed files with 1478 additions and 1489 deletions
|
@ -7,54 +7,54 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = '''
|
||||
author: Unknown (!UNKNOWN)
|
||||
name: syslog_json
|
||||
type: notification
|
||||
requirements:
|
||||
- whitelist in configuration
|
||||
short_description: sends JSON events to syslog
|
||||
description:
|
||||
- This plugin logs ansible-playbook and ansible runs to a syslog server in JSON format.
|
||||
options:
|
||||
server:
|
||||
description: Syslog server that will receive the event.
|
||||
type: str
|
||||
env:
|
||||
- name: SYSLOG_SERVER
|
||||
default: localhost
|
||||
ini:
|
||||
- section: callback_syslog_json
|
||||
key: syslog_server
|
||||
port:
|
||||
description: Port on which the syslog server is listening.
|
||||
type: int
|
||||
env:
|
||||
- name: SYSLOG_PORT
|
||||
default: 514
|
||||
ini:
|
||||
- section: callback_syslog_json
|
||||
key: syslog_port
|
||||
facility:
|
||||
description: Syslog facility to log as.
|
||||
type: str
|
||||
env:
|
||||
- name: SYSLOG_FACILITY
|
||||
default: user
|
||||
ini:
|
||||
- section: callback_syslog_json
|
||||
key: syslog_facility
|
||||
setup:
|
||||
description: Log setup tasks.
|
||||
env:
|
||||
- name: ANSIBLE_SYSLOG_SETUP
|
||||
type: bool
|
||||
default: true
|
||||
ini:
|
||||
- section: callback_syslog_json
|
||||
key: syslog_setup
|
||||
version_added: 4.5.0
|
||||
'''
|
||||
DOCUMENTATION = r"""
|
||||
author: Unknown (!UNKNOWN)
|
||||
name: syslog_json
|
||||
type: notification
|
||||
requirements:
|
||||
- whitelist in configuration
|
||||
short_description: sends JSON events to syslog
|
||||
description:
|
||||
- This plugin logs ansible-playbook and ansible runs to a syslog server in JSON format.
|
||||
options:
|
||||
server:
|
||||
description: Syslog server that will receive the event.
|
||||
type: str
|
||||
env:
|
||||
- name: SYSLOG_SERVER
|
||||
default: localhost
|
||||
ini:
|
||||
- section: callback_syslog_json
|
||||
key: syslog_server
|
||||
port:
|
||||
description: Port on which the syslog server is listening.
|
||||
type: int
|
||||
env:
|
||||
- name: SYSLOG_PORT
|
||||
default: 514
|
||||
ini:
|
||||
- section: callback_syslog_json
|
||||
key: syslog_port
|
||||
facility:
|
||||
description: Syslog facility to log as.
|
||||
type: str
|
||||
env:
|
||||
- name: SYSLOG_FACILITY
|
||||
default: user
|
||||
ini:
|
||||
- section: callback_syslog_json
|
||||
key: syslog_facility
|
||||
setup:
|
||||
description: Log setup tasks.
|
||||
env:
|
||||
- name: ANSIBLE_SYSLOG_SETUP
|
||||
type: bool
|
||||
default: true
|
||||
ini:
|
||||
- section: callback_syslog_json
|
||||
key: syslog_setup
|
||||
version_added: 4.5.0
|
||||
"""
|
||||
|
||||
import logging
|
||||
import logging.handlers
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue