ansible / ansible.builtin / v2.4.6.0-1 / module / vyos_interface Manage Interface on VyOS network devices | "added in version" 2.4 of ansible.builtin" Authors: Ganesh Nalawade (@ganeshrn) preview | supported by networkansible.builtin.vyos_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 VyOS network devices.
- name: configure interface vyos_interface: name: eth0 description: test-interface
- name: remove interface vyos_interface: name: eth0 state: absent
- name: make interface down vyos_interface: name: eth0 enabled: False
- name: make interface up vyos_interface: name: eth0 enabled: True
- name: Configure interface speed, mtu, duplex vyos_interface: name: eth5 state: present speed: 100 mtu: 256 duplex: full
- name: Set interface using aggregate vyos_interface: aggregate: - { name: eth1, description: test-interface-1, speed: 100, duplex: half, mtu: 512} - { name: eth2, description: test-interface-2, speed: 1000, duplex: full, mtu: 256}
- name: Disable interface on aggregate net_interface: aggregate: - name: eth1 - name: eth2 enabled: False
- name: Delete interface using aggregate net_interface: aggregate: - name: eth1 - name: eth2 state: absent
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) and I(neighbors). 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 - auto default: auto description: - Interface link status. enabled: description: - Interface link status. 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: - set interfaces ethernet eth0 description "test-interface" - set interfaces ethernet eth0 speed 100 - set interfaces ethernet eth0 mtu 256 - set interfaces ethernet eth0 duplex full type: list