junipernetworks.junos.junos_vlans – VLANs resource module¶
Note
This plugin is part of the junipernetworks.junos collection (version 1.3.0).
To install it use: ansible-galaxy collection install junipernetworks.junos
.
To use it in a playbook, specify: junipernetworks.junos.junos_vlans
.
New in version 1.0.0: of junipernetworks.junos
Synopsis¶
This module creates and manages VLAN configurations on Junos OS.
Note
This module has a corresponding action plugin.
Requirements¶
The below requirements are needed on the host that executes this module.
ncclient (>=v0.6.4)
Parameters¶
Notes¶
Note
This module requires the netconf system service be enabled on the remote device being managed
Tested against Junos OS 18.4R1
This module works with connection
netconf
. See the Junos OS Platform Options.
Examples¶
# Using merged
#############
# Before State
# ------------
#
# admin# show vlans
# vlan-2 {
# vlan-id 2;
# }
# vlan-3 {
# vlan-id 3;
# }
- name: Merge JUNOS vlan
junipernetworks.junos.junos_vlans:
config:
- name: vlan-1
vlan-id: 1
state: merged
- name: Replace JUNOS vlan
junipernetworks.junos.junos_vlans:
config:
- name: vlan-1
vlan-id: 10
- name: vlan-3
vlan-id: 30
state: replaced
- name: Override JUNOS vlan
junipernetworks.junos.junos_vlans:
config:
- name: vlan-4
vlan-id: 100
- name: vlan-2
vlan-id: 200
state: overridden
- name: Delete JUNOS vlan
junipernetworks.junos.junos_vlans:
config:
- name: vlan-1
state: deleted
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Authors¶
Daniel Mellado (@dmellado)