Courseiva
hardMultiple ChoiceObjective-mapped

CCNP Practice Question: An Ansible playbook is written to configure a…

An Ansible playbook is written to configure a VLAN on a Cisco IOS-XE device via Cisco DNA Center's intent API:

- name: Configure VLAN via DNA Center hosts: localhost gather_facts: no tasks: - name: Create VLAN 100 cisco.dnac.vlan: host: "{{ dnac_host }}"

username: "{{ dnac_username }}"

password: "{{ dnac_password }}" validate_certs: no state: present vlan_name: "Engineering" vlan_id: 100 site_id: "{{ site_id }}" register: result

- debug: var=result

What is a potential issue with this playbook?

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

The 'site_id' parameter is mandatory for creating a VLAN in DNA Center; if missing, the task will fail.

The cisco.dnac.vlan module requires the 'site_id' parameter to associate the VLAN with a specific site. If the site_id is not provided or is incorrect, the task will fail or create the VLAN in the wrong location. Additionally, the playbook assumes the DNA Center credentials are correctly set.

Answer analysis

Option-by-option breakdown

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

  • The module name is incorrect; it should be cisco.dnac.network_vlan.

    Why it's wrong here

    The module cisco.dnac.vlan is valid for managing VLANs in DNA Center.

  • The playbook does not include a task to obtain an authentication token, which is required by DNA Center API.

    Why it's wrong here

    The cisco.dnac collection modules handle authentication internally if host, username, and password are provided.

  • The 'site_id' parameter is mandatory for creating a VLAN in DNA Center; if missing, the task will fail.

    Why this is correct

    Correct. DNA Center requires a site ID to associate the VLAN with a specific site. Without it, the API call will return an error.

  • The 'state: present' is invalid; it should be 'state: create'.

    Why it's wrong here

    'state: present' is the correct parameter to ensure the VLAN exists. 'create' is not a valid state.

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

One of 1,175 original 350-401 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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 350-401 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 350-401 exam.