ansible / ansible.builtin / v2.6.0 / module / nxos_l3_interface Manage L3 interfaces on Cisco NXOS network devices | "added in version" 2.5 of ansible.builtin" Authors: Trishna Guha (@trishnaguha) preview | supported by networkansible.builtin.nxos_l3_interface (v2.6.0) — module
pip
Install with pip install ansible==2.6.0
This module provides declarative management of L3 interfaces on Cisco NXOS network devices.
- name: Set interface IPv4 address nxos_l3_interface: name: Ethernet2/3 ipv4: 192.168.0.1/24
- name: Remove interface IPv4 address nxos_l3_interface: name: Ethernet2/3 state: absent
- name: Set IP addresses on aggregate nxos_l3_interface: aggregate: - { name: Ethernet2/1, ipv4: 192.168.2.10/24 } - { name: Ethernet2/5, ipv4: 192.168.3.10/24, ipv6: "fd5d:12c9:2201:1::1/64" }
- name: Remove IP addresses on aggregate nxos_l3_interface: aggregate: - { name: Ethernet2/1, ipv4: 192.168.2.10/24 } - { name: Ethernet2/5, ipv4: 192.168.3.10/24, ipv6: "fd5d:12c9:2201:1::1/64" } state: absent
ipv4: description: - IPv4 of the L3 interface. ipv6: description: - IPv6 of the L3 interface. name: description: - Name of the L3 interface. state: choices: - present - absent default: present description: - State of the L3 interface configuration. aggregate: description: List of L3 interfaces definitions.
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. sample: - interface ethernet2/3 - no switchport - ip address 192.168.22.1/24 - ipv6 address "fd5d:12c9:2201:1::1/64" - no ip address 192.168.22.1/24 type: list