[PR #9535/3af793c2 backport][stable-10] plugins (become, callback, filter): style adjustments (#9545)

plugins (become, callback, filter): style adjustments (#9535)

* plugins (become, callback, filter, inventory): style adjustments

* remove inventory plugins from PR

* adjustments from review

* typo

(cherry picked from commit 3af793c2c1)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
patchback[bot] 2025-01-07 18:45:39 +01:00 committed by GitHub
parent 75f649648e
commit 39a66a3196
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 696 additions and 699 deletions

View file

@ -8,41 +8,41 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = '''
name: jc
short_description: Convert output of many shell commands and file-types to JSON
version_added: 1.1.0
author: Kelly Brazil (@kellyjonbrazil)
description:
- Convert output of many shell commands and file-types to JSON.
- Uses the L(jc library,https://github.com/kellyjonbrazil/jc).
positional: parser
options:
_input:
description: The data to convert.
type: string
required: true
parser:
description:
- The correct parser for the input data.
- For example V(ifconfig).
- "Note: use underscores instead of dashes (if any) in the parser module name."
- See U(https://github.com/kellyjonbrazil/jc#parsers) for the latest list of parsers.
type: string
required: true
quiet:
description: Set to V(false) to not suppress warnings.
type: boolean
default: true
raw:
description: Set to V(true) to return pre-processed JSON.
type: boolean
default: false
requirements:
- jc installed as a Python library (U(https://pypi.org/project/jc/))
'''
DOCUMENTATION = r"""
name: jc
short_description: Convert output of many shell commands and file-types to JSON
version_added: 1.1.0
author: Kelly Brazil (@kellyjonbrazil)
description:
- Convert output of many shell commands and file-types to JSON.
- Uses the L(jc library,https://github.com/kellyjonbrazil/jc).
positional: parser
options:
_input:
description: The data to convert.
type: string
required: true
parser:
description:
- The correct parser for the input data.
- For example V(ifconfig).
- 'Note: use underscores instead of dashes (if any) in the parser module name.'
- See U(https://github.com/kellyjonbrazil/jc#parsers) for the latest list of parsers.
type: string
required: true
quiet:
description: Set to V(false) to not suppress warnings.
type: boolean
default: true
raw:
description: Set to V(true) to return pre-processed JSON.
type: boolean
default: false
requirements:
- jc installed as a Python library (U(https://pypi.org/project/jc/))
"""
EXAMPLES = '''
EXAMPLES = r"""
- name: Install the prereqs of the jc filter (jc Python package) on the Ansible controller
delegate_to: localhost
ansible.builtin.pip:
@ -68,13 +68,13 @@ EXAMPLES = '''
# "operating_system": "GNU/Linux",
# "processor": "x86_64"
# }
'''
"""
RETURN = '''
_value:
description: The processed output.
type: any
'''
RETURN = r"""
_value:
description: The processed output.
type: any
"""
from ansible.errors import AnsibleError, AnsibleFilterError
import importlib