junos_lag_interfaces – Manage Link Aggregation on Juniper JUNOS devices¶
New in version 2.9.
Requirements¶
The below requirements are needed on the host that executes this module.
ncclient (>=v0.6.4)
Parameters¶
Notes¶
Note
This module requires the netconf system service be enabled on the remote device being managed.
Tested against vSRX JUNOS version 18.4R1.
This module works with connection
netconf
. See the Junos OS Platform Options.
Examples¶
# Using merged
# Before state:
# -------------
# user@junos01# show interfaces
# ge-0/0/1 {
# description "Ansible configured interface 1";
# ether-options {
# 802.3ad ae0;
# }
# }
# ge-0/0/2 {
# description "Ansible configured interface 2";
# ether-options {
# 802.3ad ae0;
# }
# }
# ae0 {
# description "lag interface";
# }
# ae1 {
# description "lag interface 1";
# }
- name: "Delete LAG attributes of given interfaces (Note: This won't delete the interface itself)"
junos_lag_interfaces:
config:
- name: ae0
- name: ae1
state: deleted
# After state:
# -------------
# user@junos01# show interfaces
# ge-0/0/1 {
# description "Ansible configured interface 1";
# }
# ge-0/0/2 {
# description "Ansible configured interface 2";
# }
# Using merged
# Before state:
# -------------
# user@junos01# show interfaces
# ge-0/0/1 {
# description "Ansible configured interface 1";
# }
# ge-0/0/2 {
# description "Ansible configured interface 2";
# }
- name: Merge provided configuration with device configuration
junos_lag_interfaces:
config:
- name: ae0
members:
- member: ge-0/0/1
link_type: primary
- member: ge-0/0/2
link_type: backup
state: merged
# After state:
# -------------
# user@junos01# show interfaces
# ge-0/0/1 {
# description "Ansible configured interface 1";
# ether-options {
# 802.3ad {
# ae0;
# primary;
# }
# }
# }
# ge-0/0/2 {
# description "Ansible configured interface 2";
# ether-options {
# 802.3ad {
# ae0;
# backup;
# }
# }
# }
# Using merged
# Before state:
# -------------
# user@junos01# show interfaces
# ge-0/0/1 {
# description "Ansible configured interface 1";
# ether-options {
# 802.3ad ae0;
# }
# }
# ge-0/0/2 {
# description "Ansible configured interface 2";
# ether-options {
# 802.3ad ae0;
# }
# }
# ae0 {
# description "lag interface";
# }
# ae3 {
# description "lag interface 3";
# }
- name: Overrides all device LAG configuration with provided configuration
junos_lag_interfaces:
config:
- name: ae0
members:
- member: ge-0/0/2
- name: ae1
members:
- member: ge-0/0/1
mode: passive
state: overridden
# After state:
# -------------
# user@junos01# show interfaces
# ge-0/0/1 {
# description "Ansible configured interface 1";
# ether-options {
# 802.3ad ae1;
# }
# }
# ge-0/0/2 {
# description "Ansible configured interface 2";
# ether-options {
# 802.3ad ae0;
# }
# }
# ae0 {
# description "lag interface";
# }
# ae1 {
# aggregated-ether-options {
# lacp {
# active;
# }
# }
# }
# Using merged
# Before state:
# -------------
# user@junos01# show interfaces
# ge-0/0/1 {
# description "Ansible configured interface 1";
# }
# ge-0/0/2 {
# description "Ansible configured interface 2";
# }
# ge-0/0/3 {
# description "Ansible configured interface 3";
# }
- name: Replace device LAG configuration with provided configuration
junos_lag_interfaces:
config:
- name: ae0
members:
- member: ge-0/0/1
mode: active
state: replaced
# After state:
# -------------
# user@junos01# show interfaces
# ge-0/0/1 {
# description "Ansible configured interface 1";
# ether-options {
# 802.3ad ae0;
# }
# }
# ge-0/0/2 {
# description "Ansible configured interface 2";
# }
# ae0 {
# aggregated-ether-options {
# lacp {
# active;
# }
# }
# }
# ge-0/0/3 {
# description "Ansible configured interface 3";
# }
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Status¶
This module is not guaranteed to have a backwards compatible interface. [preview]
This module is maintained by the Ansible Network Team. [network]
Red Hat Support¶
More information about Red Hat’s support of this module is available from this Red Hat Knowledge Base article.
Authors¶
Ganesh Nalawade (@ganeshrn)
Hint
If you notice any issues in this documentation, you can edit this document to improve it.