arista.eos.eos_lacp module – LACP resource module

Note

This module is part of the arista.eos collection (version 9.0.0).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install arista.eos.

To use it in a playbook, specify: arista.eos.eos_lacp.

New in arista.eos 1.0.0

Synopsis

  • This module manages Global Link Aggregation Control Protocol (LACP) on Arista EOS devices.

Aliases: lacp

Parameters

Parameter

Comments

config

dictionary

LACP global options.

system

dictionary

LACP system options.

priority

integer

The system priority to use in LACP negotiations.

Lower value is higher priority.

Refer to vendor documentation for valid values.

running_config

string

This option is used only with state parsed.

The value of this option should be the output received from the EOS device by executing the command show running-config | section ^lacp.

The state parsed reads the configuration from running_config option and transforms it into Ansible structured data as per the resource module’s argspec and the value is then returned in the parsed key within the result.

state

string

The state of the configuration after module completion.

Choices:

  • "merged" ← (default)

  • "replaced"

  • "deleted"

  • "parsed"

  • "rendered"

  • "gathered"

Notes

Note

  • Tested against Arista EOS 4.24.6F

  • This module works with connection network_cli. See the EOS Platform Options.

Examples

# Using merged

# Before state:
# -------------
# veos# show running-config | include lacp
# lacp system-priority 10

- name: Merge provided global LACP attributes with device attributes
  arista.eos.eos_lacp:
    config:
      system:
        priority: 20
    state: merged

# After state:
# ------------
# veos# show running-config | include lacp
# lacp system-priority 20
#


# Using replaced

# Before state:
# -------------
# veos# show running-config | include lacp
# lacp system-priority 10

- name: Replace device global LACP attributes with provided attributes
  arista.eos.eos_lacp:
    config:
      system:
        priority: 20
    state: replaced

# After state:
# ------------
# veos# show running-config | include lacp
# lacp system-priority 20
#


# Using deleted

# Before state:
# -------------
# veos# show running-config | include lacp
# lacp system-priority 10

- name: Delete global LACP attributes
  arista.eos.eos_lacp:
    state: deleted

# After state:
# ------------
# veos# show running-config | include lacp
#

# Using rendered:

- name: Use Rendered to convert the structured data to native config
  arista.eos.eos_lacp:
    config:
      system:
        priority: 20
    state: rendered

# Output:
# ------------
# rendered:
#   - "lacp system-priority 20"
#

# Using parsed:

# parsed.cfg
# lacp system-priority 20

- name: Use parsed to convert native configs to structured data
  arista.eos.eos_lacp:
    running_config: "{{ lookup('file', 'parsed.cfg') }}"
    state: parsed

# Output:
# parsed:
#   system:
#     priority: 20

# Using gathered:
# nathive config:
# -------------
# lacp system-priority 10

- name: Gather lacp facts from the device
  arista.eos.eos_lacp:
    state: gathered

# Output:
# gathered:
#   system:
#     priority: 10
#

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

after

dictionary

The configuration as structured data after module completion.

Returned: when changed

Sample: "The configuration returned will always be in the same format\n of the parameters above.\n"

before

dictionary

The configuration as structured data prior to module invocation.

Returned: always

Sample: "The configuration returned will always be in the same format\n of the parameters above.\n"

commands

list / elements=string

The set of commands pushed to the remote device.

Returned: always

Sample: ["lacp system-priority 10"]

Authors

  • Nathaniel Case (@Qalthos)