l*.py: normalize docs (#9390)

This commit is contained in:
Alexei Znamensky 2024-12-26 21:12:05 +13:00 committed by GitHub
parent 6b7ea3443d
commit cea6eeef37
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
25 changed files with 1194 additions and 1350 deletions

View file

@ -9,13 +9,12 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = '''
---
DOCUMENTATION = r"""
module: lldp
requirements: [ lldpctl ]
short_description: Get details reported by lldp
requirements: [lldpctl]
short_description: Get details reported by LLDP
description:
- Reads data out of lldpctl
- Reads data out of C(lldpctl).
extends_documentation_fragment:
- community.general.attributes
attributes:
@ -26,25 +25,24 @@ attributes:
options: {}
author: "Andy Hill (@andyhky)"
notes:
- Requires lldpd running and lldp enabled on switches
'''
- Requires C(lldpd) running and LLDP enabled on switches.
"""
EXAMPLES = '''
EXAMPLES = r"""
# Retrieve switch/port information
- name: Gather information from lldp
community.general.lldp:
- name: Gather information from LLDP
community.general.lldp:
- name: Print each switch/port
ansible.builtin.debug:
- name: Print each switch/port
ansible.builtin.debug:
msg: "{{ lldp[item]['chassis']['name'] }} / {{ lldp[item]['port']['ifname'] }}"
with_items: "{{ lldp.keys() }}"
with_items: "{{ lldp.keys() }}"
# TASK: [Print each switch/port] ***********************************************************
# ok: [10.13.0.22] => (item=eth2) => {"item": "eth2", "msg": "switch1.example.com / Gi0/24"}
# ok: [10.13.0.22] => (item=eth1) => {"item": "eth1", "msg": "switch2.example.com / Gi0/3"}
# ok: [10.13.0.22] => (item=eth0) => {"item": "eth0", "msg": "switch3.example.com / Gi0/3"}
'''
"""
from ansible.module_utils.basic import AnsibleModule