ansible / ansible.builtin / v2.4.6.0-1 / module / iosxr_interface Manage Interface on Cisco IOS XR network devices | "added in version" 2.4 of ansible.builtin" Authors: Ganesh Nalawade (@ganeshrn) preview | supported by networkansible.builtin.iosxr_interface (v2.4.6.0-1) — module
pip
Install with pip install ansible==2.4.6.0.post1
This module provides declarative management of Interfaces on Cisco IOS XR network devices.
- name: configure interface iosxr_interface: name: GigabitEthernet0/0/0/2 description: test-interface speed: 100 duplex: half mtu: 512
- name: remove interface iosxr_interface: name: GigabitEthernet0/0/0/2 state: absent
- name: make interface up iosxr_interface: name: GigabitEthernet0/0/0/2 enabled: True
- name: make interface down iosxr_interface: name: GigabitEthernet0/0/0/2 enabled: False
- name: Create interface using aggregate iosxr_interface: aggregate: - name: GigabitEthernet0/0/0/3 - name: GigabitEthernet0/0/0/2 speed: 100 duplex: full mtu: 512 state: present
- name: Delete interface using aggregate iosxr_interface: aggregate: - name: GigabitEthernet0/0/0/3 - name: GigabitEthernet0/0/0/2 state: absent
- name: Check intent arguments iosxr_interface: name: GigabitEthernet0/0/0/5 state: up delay: 20
- name: Config + intent iosxr_interface: name: GigabitEthernet0/0/0/5 enabled: False state: down delay: 20
mtu: description: - Maximum size of transmit packet. name: description: - Name of the Interface. required: true delay: default: 10 description: - Time in seconds to wait before checking for the operational state on remote device. This wait is applicable for operational state argument which are I(state) with values C(up)/C(down), I(tx_rate) and I(rx_rate). speed: description: - Interface link speed. state: choices: - present - absent - up - down default: present description: - State of the Interface configuration, C(up) means present and operationally up and C(down) means present and operationally C(down) duplex: choices: - full - half description: - Interface link status enabled: description: - Interface link status. rx_rate: description: - Receiver rate in bits per second (bps). tx_rate: description: - Transmit rate in bits per second (bps). aggregate: description: List of Interfaces definitions. description: description: - Description of Interface.
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 GigabitEthernet0/0/0/2 - description test-interface - duplex half - mtu 512 type: list