ansible / ansible.builtin / v2.4.4.0-1 / module / junos_interface Manage Interface on Juniper JUNOS network devices | "added in version" 2.4 of ansible.builtin" Authors: Ganesh Nalawade (@ganeshrn) preview | supported by networkansible.builtin.junos_interface (v2.4.4.0-1) — module
pip
Install with pip install ansible==2.4.4.0.post1
This module provides declarative management of Interfaces on Juniper JUNOS network devices.
- name: configure interface junos_interface: name: ge-0/0/1 description: test-interface
- name: remove interface junos_interface: name: ge-0/0/1 state: absent
- name: make interface down junos_interface: name: ge-0/0/1 enabled: False
- name: make interface up junos_interface: name: ge-0/0/1 enabled: True
- name: Deactivate interface config junos_interface: name: ge-0/0/1 state: present active: False
- name: Activate interface config net_interface: name: ge-0/0/1 state: present active: True
- name: Configure interface speed, mtu, duplex junos_interface: name: ge-0/0/1 state: present speed: 1g mtu: 256 duplex: full
- name: Create interface using aggregate junos_interface: aggregate: - name: ge-0/0/1 description: test-interface-1 - name: ge-0/0/2 description: test-interface-2 speed: 1g duplex: full mtu: 512
- name: Delete interface using aggregate junos_interface: aggregate: - name: ge-0/0/1 - name: ge-0/0/2 state: absent
- name: Check intent arguments junos_interface: name: "{{ name }}" state: up tx_rate: ge(0) rx_rate: le(0)
- name: Config + intent junos_interface: name: "{{ name }}" enabled: False state: down
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) idicates present and operationally up and C(down) indicates present and operationally C(down) active: choices: - true - false default: true description: - Specifies whether or not the configuration is active or deactivated duplex: choices: - full - half - auto default: auto description: - Interface link status. enabled: description: - Configure 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.
diff.prepared: description: Configuration difference before and after applying change. returned: when configuration is changed and diff option is enabled. sample: '[edit interfaces] + ge-0/0/1 { + description test-interface; + } ' type: string