New in version 2.9.
| Parameter | Choices/Defaults | Comments | |
|---|---|---|---|
|   config    list / elements=dictionary    |    A dictionary of VLANs options   |  ||
|   name    string    |    Name of the VLAN.   |  ||
|   state    string    |   
  |    Operational state of the VLAN   |  |
|   vlan_id    integer / required    |    ID of the VLAN. Range 1-4094   |  ||
|   state    string    |   
  |    The state of the configuration after module completion   |  |
Note
network_cli. See the EOS Platform Options.# Using deleted
# Before state:
# -------------
#
# veos(config-vlan-20)#show running-config | section vlan
# vlan 10
#    name ten
# !
# vlan 20
#    name twenty
- name: Delete attributes of the given VLANs.
  eos_vlans:
    config:
      - vlan_id: 20
    state: deleted
# After state:
# ------------
#
# veos(config-vlan-20)#show running-config | section vlan
# vlan 10
#    name ten
# Using merged
# Before state:
# -------------
#
# veos(config-vlan-20)#show running-config | section vlan
# vlan 10
#    name ten
# !
# vlan 20
#    name twenty
- name: Merge given VLAN attributes with device configuration
  eos_vlans:
    config:
      - vlan_id: 20
        state: suspend
    state: merged
# After state:
# ------------
#
# veos(config-vlan-20)#show running-config | section vlan
# vlan 10
#    name ten
# !
# vlan 20
#    name twenty
#    state suspend
# Using overridden
# Before state:
# -------------
#
# veos(config-vlan-20)#show running-config | section vlan
# vlan 10
#    name ten
# !
# vlan 20
#    name twenty
- name: Override device configuration of all VLANs with provided configuration
  eos_vlans:
    config:
      - vlan_id: 20
        state: suspend
    state: overridden
# After state:
# ------------
#
# veos(config-vlan-20)#show running-config | section vlan
# vlan 20
#    state suspend
# Using replaced
# Before state:
# -------------
#
# veos(config-vlan-20)#show running-config | section vlan
# vlan 10
#    name ten
# !
# vlan 20
#    name twenty
- name: Replace all attributes of specified VLANs with provided configuration
  eos_vlans:
    config:
      - vlan_id: 20
        state: suspend
    state: replaced
# After state:
# ------------
#
# veos(config-vlan-20)#show running-config | section vlan
# vlan 10
#    name ten
# !
# vlan 20
#    state suspend
   Common return values are documented here, the following are the fields unique to this module:
| Key | Returned | Description | 
|---|---|---|
|   after    list    |  when changed |   The configuration as structured data after module completion.  Sample:  The configuration returned will always be in the same format of the parameters above.   |  
|   before    list    |  always |   The configuration as structured data prior to module invocation.  Sample:  The configuration returned will always be in the same format of the parameters above.   |  
|   commands    list    |  always |   The set of commands pushed to the remote device.  Sample:  ['vlan 10', 'no name', 'vlan 11', 'name Eleven']   |  
More information about Red Hat’s support of this module is available from this Red Hat Knowledge Base article.
Hint
If you notice any issues in this documentation, you can edit this document to improve it.
    © 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
    https://docs.ansible.com/ansible/2.9/modules/eos_vlans_module.html