ansible / ansible.builtin / v2.4.4.0-1 / module / junos_vlan Manage VLANs on Juniper JUNOS network devices | "added in version" 2.4 of ansible.builtin" Authors: Ganesh Nalawade (@ganeshrn) preview | supported by networkansible.builtin.junos_vlan (v2.4.4.0-1) — module
pip
Install with pip install ansible==2.4.4.0.post1
This module provides declarative management of VLANs on Juniper JUNOS network devices.
- name: configure VLAN ID and name junos_vlan: vlan_name: test vlan_id: 20 name: test-vlan
- name: remove VLAN configuration junos_vlan: vlan_name: test state: absent
- name: deactive VLAN configuration junos_vlan: vlan_name: test state: present active: False
- name: activate VLAN configuration junos_vlan: vlan_name: test state: present active: True
- name: Create vlan configuration using aggregate junos_vlan: aggregate: - { vlan_id: 159, name: test_vlan_1, description: test vlan-1 } - { vlan_id: 160, name: test_vlan_2, description: test vlan-2 }
- name: Delete vlan configuration using aggregate junos_vlan: aggregate: - { vlan_id: 159, name: test_vlan_1 } - { vlan_id: 160, name: test_vlan_2 } state: absent
name: description: - Name of the VLAN. required: true state: choices: - present - absent default: present description: - State of the VLAN configuration. active: choices: - true - false default: true description: - Specifies whether or not the configuration is active or deactivated vlan_id: description: - ID of the VLAN. required: true aggregate: description: List of VLANs definitions. interfaces: description: - List of interfaces to check the VLAN has been configured correctly. description: description: - Text description of VLANs.
diff.prepared: description: Configuration difference before and after applying change. returned: when configuration is changed and diff option is enabled. sample: '[edit vlans] + test-vlan-1 { + vlan-id 60; + } ' type: string