New in version 2.9.
The below requirements are needed on the host that executes this module.
Parameter | Choices/Defaults | Comments | ||
---|---|---|---|---|
config list | A list of link aggregation group configurations. | |||
link_protection boolean |
| This boolean option indicates if link protection should be enabled for the LAG interface. If value is True link protection is enabled on LAG and if value is False link protection is disabled. | ||
members list | List of member interfaces of the link aggregation group. The value can be single interface or list of interfaces. | |||
link_type - |
| The value of this options configures the member link as either primary or backup . Value primary configures primary interface for link-protection mode and backup configures backup interface for link-protection mode. | ||
member string | Name of the member interface. | |||
mode - |
| LAG mode. A value of passive will enable LACP in passive mode that is it will respond to LACP packets and active configures the link to initiate transmission of LACP packets. | ||
name string / required | Name of the link aggregation group (LAG). | |||
state string |
| The state of the configuration after module completion |
Note
netconf
. See the Junos OS Platform Options.# 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"; # }
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description |
---|---|---|
after list | when changed | The configuration as structured data after module completion. Sample: The configuration returned will always be in the same format of the parameters above. |
before list | always | The configuration as structured data prior to module invocation. Sample: The configuration returned will always be in the same format of the parameters above. |
xml list | always | The set of xml rpc payload pushed to the remote device. Sample: ['xml 1', 'xml 2', 'xml 3'] |
More information about Red Hat’s support of this module is available from this Red Hat Knowledge Base article.
Hint
If you notice any issues in this documentation, you can edit this document to improve it.
© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.9/modules/junos_lag_interfaces_module.html