Ansible ios_vlan Module: VLAN Configuration on IOS Devices
Short answer
A Ios_vlan creates, modifies, and deletes VLANs on Cisco IOS devices, so it manages VLAN configuration rather than routing, QoS, or configuration backup.
Question
Key Takeaways
The Ansible ios_vlan module is the Cisco IOS collection module for declarative VLAN management: it creates, modifies, and deletes VLANs on IOS devices. Option A is correct because VLAN configuration is exactly its purpose, while routing, QoS, and configuration backup are handled by other modules or workflows.
Expert Analysis
ios_vlan module creates, modifies, and deletes VLANs.
The module's resource-specific name settles the decision: ios_vlan is a Cisco IOS Ansible module whose managed object is a VLAN, not a route, a QoS policy, or a configuration archive. Its task arguments describe VLAN properties—most importantly the VLAN ID and desired state—so a playbook can create a VLAN, update its attributes, or remove it without hand-writing the equivalent IOS CLI. Option A, "Manages VLAN configuration on IOS devices," is therefore the direct description of the module's scope.
For VLAN work, the module's lifecycle matches the wording in the correct choice. A task that targets a VLAN ID with state: present ensures the VLAN exists and applies supplied attributes such as the VLAN name; running the same task again does not create a duplicate. state: absent removes that VLAN. This is more precise than saying it "configures switching" in general, because the object being managed is the Layer 2 VLAN itself. The module is therefore the right building block when a playbook must standardise VLAN IDs and names across IOS devices.
The routing option fails because creating a VLAN identifier has no effect on the device's Layer 3 forwarding table. Routing requires interface addressing, static routes, or a routing protocol, and those are expressed through different modules or through ios_config with route-related commands. A VLAN can later be associated with an SVI, but the act of managing the VLAN does not configure or validate routing; ios_vlan exposes no route destination, next hop, or routing-protocol parameter.
The QoS option fails for the same reason at a different layer. QoS configuration is built from classification, marking, queuing, and policy attachment—constructs such as class maps, policy maps, and service policies. ios_vlan manages VLAN existence and attributes, not a QoS policy. Even where VLAN membership is used as a match criterion in a QoS design, the module that creates the VLAN is not the module that defines or applies the QoS behaviour.
The backup option confuses a side effect with purpose. A VLAN change alters the running configuration, and any configuration-changing workflow may benefit from taking a backup before or after the change, but ios_vlan does not produce a configuration backup artifact. Backup behaviour belongs to a configuration-management task, such as an ios_config task that enables backup, or a separate retrieval and storage workflow. Managing VLANs is not the same as archiving the device configuration.
A mechanism that clarifies the module's behaviour is idempotent state management through the state parameter. Consider a task with vlan_id: 120, name: users, and state: present. The first run creates VLAN 120 if it is missing; a subsequent run finds it and leaves it in place, changing only attributes that differ from the declared values. Changing the task to state: absent makes the module remove VLAN 120. That convergence model is why the module belongs in declarative configuration automation, rather than being a thin wrapper that blindly sends one CLI command every time. It also explains why the module is scoped to the VLAN object: the desired end state is "VLAN 120 exists with this name," not "a route exists," "a QoS policy is attached," or "a backup file was written."
For module-selection questions, the module's name and parameter vocabulary are the strongest evidence. ios_vlan names the platform and the managed resource, and its parameters describe VLAN identity and state. When a choice describes a different resource domain—routing, QoS, or backup—it is not made correct by the fact that VLANs can be involved somewhere in the broader design. Here, the only choice that matches the module's own managed object is A.
Exam Strategy
When an Ansible module question appears, parse the module name as platform plus managed resource before evaluating the prose choices. Prefixes such as ios_ identify Cisco IOS, and the suffix identifies the object—vlan, config, command, l3_interfaces, or static_routes. Then check whether the option's verb fits that object: creating, modifying, or deleting a VLAN belongs with vlan, while route installation, QoS policy attachment, and backup are different resource domains. If the module name and the option's action diverge, eliminate the option even when the technology could be adjacent in a full design.
Related Analysis
Practice All 300-435 Questions
Access 150 questions with complete answers and detailed explanations.
View Full 300-435 Practice Test →