ansible / ansible.builtin / v2.3.3.0-1 / module / nxos_ip_interface Manages L3 attributes for IPv4 and IPv6 interfaces. | "added in version" 2.1 of ansible.builtin" Authors: Jason Edelman (@jedelman8), Gabriele Gerbino (@GGabriele) preview | supported by communityansible.builtin.nxos_ip_interface (v2.3.3.0-1) — module
pip
Install with pip install ansible==2.3.3.0.post1
Manages Layer 3 attributes for IPv4 and IPv6 interfaces.
- name: Ensure ipv4 address is configured on Ethernet1/32 nxos_ip_interface: interface: Ethernet1/32 transport: nxapi version: v4 state: present addr: 20.20.20.20 mask: 24
- name: Ensure ipv6 address is configured on Ethernet1/31 nxos_ip_interface: interface: Ethernet1/31 transport: cli version: v6 state: present addr: '2001::db8:800:200c:cccb' mask: 64
addr: default: null description: - IPv4 or IPv6 Address. required: false mask: default: null description: - Subnet mask for IPv4 or IPv6 Address in decimal format. required: false state: choices: - present - absent default: present description: - Specify desired state of the resource. required: false interface: description: - Full name of interface, i.e. Ethernet1/1, vlan10. required: true
changed: description: check to see if a change was made on the device returned: always sample: true type: boolean end_state: description: k/v pairs of IP attributes after module execution returned: always sample: addresses: - addr: 20.20.20.20 mask: 24 interface: ethernet1/32 prefix: 20.20.20.0 type: ethernet vrf: default type: dict existing: description: k/v pairs of existing IP attributes on the interface returned: always sample: addresses: - addr: 11.11.11.11 mask: 17 interface: ethernet1/32 prefix: 11.11.0.0 type: ethernet vrf: default type: dict proposed: description: k/v pairs of parameters passed into module returned: always sample: addr: 20.20.20.20 interface: ethernet1/32 mask: '24' type: dict updates: description: commands sent to the device returned: always sample: - interface ethernet1/32 - ip address 20.20.20.20/24 type: list