mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 03:41:25 -07:00
l*.py: normalize docs (#9390)
This commit is contained in:
parent
6b7ea3443d
commit
cea6eeef37
25 changed files with 1194 additions and 1350 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue