Courseiva
mediumMultiple Choice

200-901 Practice Question: Refer to the exhibit

Exhibit

---
- name: Configure VLAN
  hosts: switches
  tasks:
    - name: Create VLAN 10
      cisco.ios.ios_vlan:
        vlan_id: 10
        name: voice
        state: present

Refer to the exhibit. What will be the result of running this Ansible playbook against the 'switches' group?

⚠ Common exam trap

Cisco often tests the misconception that `state: merged` only modifies existing objects, but in reality, it also creates objects that do not exist, leading candidates to incorrectly choose 'modify' or 'show only' options.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

VLAN 10 will be created if it does not already exist

The playbook uses the `cisco.ios.ios_vlans` module with `state: merged`. In Ansible's `ios_vlans` module, the `merged` state ensures the VLAN configuration is present on the device. If VLAN 10 does not exist, it will be created with the specified parameters (`vlan_id 10` and `name 'voice'`). The `merged` state does not delete VLANs; it only adds or updates to match the desired state. Therefore, VLAN 10 will be created if it does not already exist.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    VLAN 10 will be deleted

    Why it's wrong here

    The playbook's ios_vlan task uses state: present with a vlan_id and name, which creates or updates the VLAN rather than removing it; deletion needs state: absent. Choosing deletion is tempting because absent is the counterpart state in the same module, and it would be the correct outcome if the task specified state: absent for VLAN 10.

  • ✗

    VLAN 10 will be modified to have the name 'voice'

    Why it's wrong here

    The playbook's task targets the switches group with a configuration that sets the VLAN name, so the change applies to the device configuration rather than modifying an existing VLAN object's name field. Renaming assumes a declarative module such as ios_vlan with a name parameter, which the exhibit does not show.

  • ✗

    The playbook will only show the running configuration of VLAN 10

    Why it's wrong here

    The ios_vlan module applies configuration changes to the device; it does not merely display the running configuration of VLAN 10. Read-only output is tempting because Ansible can gather facts and show commands, and it would be correct if the playbook used ios_command with a show vlan brief command instead of a configuration module.

  • ✓

    VLAN 10 will be created if it does not already exist

    Why this is correct

    The ios_vlan module enforces declarative state, so the task creates VLAN 10 when absent and leaves it untouched when present, satisfying the idempotency requirement. Because Ansible only applies changes needed to reach the specified state, repeated playbook runs produce no duplicate VLANs or errors on the switches group.

Visual reference

Switch VLAN 10 Sales (192.168.10.0/24) PC-A PC-B VLAN 20 HR (192.168.20.0/24) PC-C PC-D Router VLANs isolate traffic — inter-VLAN routing requires a Layer 3 device

About these practice questions

This 200-901 question is part of Courseiva's 975-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This 200-901 practice question is part of Courseiva's free Cisco certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the 200-901 exam.