diff options
Diffstat (limited to 'plugins/modules/vyos_vlan.py')
-rw-r--r-- | plugins/modules/vyos_vlan.py | 49 |
1 files changed, 25 insertions, 24 deletions
diff --git a/plugins/modules/vyos_vlan.py b/plugins/modules/vyos_vlan.py index 4564749e..a0aafb57 100644 --- a/plugins/modules/vyos_vlan.py +++ b/plugins/modules/vyos_vlan.py @@ -15,56 +15,55 @@ ANSIBLE_METADATA = { "supported_by": "network", } -DOCUMENTATION = """ ---- -module: vyos_vlan -version_added: "2.5" -author: "Trishna Guha (@trishnaguha)" +DOCUMENTATION = """module: vyos_vlan +author: Trishna Guha (@trishnaguha) short_description: Manage VLANs on VyOS network devices description: - - This module provides declarative management of VLANs - on VyOS network devices. +- This module provides declarative management of VLANs on VyOS network devices. notes: - - Tested against VyOS 1.1.8 (helium). - - This module works with connection C(network_cli). See L(the VyOS OS Platform Options,../network/user_guide/platform_vyos.html). +- Tested against VyOS 1.1.8 (helium). +- This module works with connection C(network_cli). See L(the VyOS OS Platform Options,../network/user_guide/platform_vyos.html). options: name: description: - - Name of the VLAN. + - Name of the VLAN. address: description: - - Configure Virtual interface address. + - Configure Virtual interface address. vlan_id: description: - - ID of the VLAN. Range 0-4094. + - ID of the VLAN. Range 0-4094. required: true interfaces: description: - - List of interfaces that should be associated to the VLAN. + - List of interfaces that should be associated to the VLAN. required: true associated_interfaces: description: - - This is a intent option and checks the operational state of the for given vlan C(name) - for associated interfaces. If the value in the C(associated_interfaces) does not match with - the operational state of vlan on device it will result in failure. - version_added: "2.5" + - This is a intent option and checks the operational state of the for given vlan + C(name) for associated interfaces. If the value in the C(associated_interfaces) + does not match with the operational state of vlan on device it will result in + failure. delay: description: - - Delay the play should wait to check for declarative intent params values. + - Delay the play should wait to check for declarative intent params values. default: 10 aggregate: description: List of VLANs definitions. purge: description: - - Purge VLANs not defined in the I(aggregate) parameter. - default: no + - Purge VLANs not defined in the I(aggregate) parameter. + default: false type: bool state: description: - - State of the VLAN configuration. + - State of the VLAN configuration. default: present - choices: ['present', 'absent'] -extends_documentation_fragment: vyos + choices: + - present + - absent +extends_documentation_fragment: +- vyos.vyos.vyos """ EXAMPLES = """ @@ -125,7 +124,9 @@ import time from copy import deepcopy from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils.network.common.utils import remove_default_spec +from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import ( + remove_default_spec, +) from ansible_collections.vyos.vyos.plugins.module_utils.network.vyos.vyos import ( load_config, run_commands, |