Courseiva
AI and Network OperationsmediumMatchingObjective-mapped

CCNA Ansible Playbook Practice Question

Match each automation term to the best description.

Drag a concept onto its matching description — or click a concept then click the description.

Concepts
Matches

Data modeling language for structured network data

Lightweight text format for structured data exchange

Programmatic interface exposed by a system

Credential presented to authenticate or authorize a request

⚠ Common exam trap

A common mistake is confusing a Playbook with a Role: a Playbook is a top-level workflow that may use multiple Roles, while a Role is a modular collection of related configuration items.

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

Playbook: A YAML file defining automation tasks in Ansible

In Ansible, a Playbook is a YAML file that defines automation tasks, making option A correct. A Module is a reusable unit of code that performs a specific task, such as managing files or installing software, matching option B. An Inventory is a list of managed nodes (hosts) that Ansible targets, aligning with option C. A Role is a structured way to group tasks, variables, and files for reuse, which corresponds to option D. These terms are central to Ansible automation and should not be confused with data modeling languages or APIs.

Answer analysis

Option-by-option breakdown

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

  • Playbook: A YAML file defining automation tasks in Ansible

    Why this is correct

    A Playbook in Ansible is a YAML-formatted file that expresses configuration management or deployment procedures as a series of plays, each mapping hosts to tasks. Since Ansible is agentless, playbooks are pushed over SSH to managed nodes without any pre-installed agent, relying on declarative, idempotent task definitions that converge the system toward the desired state. Unlike imperative scripts, playbooks are readable automation blueprints that can be version-controlled and reused.

  • Module: A reusable unit of code that performs a specific task

    Why this is correct

    An Ansible Module is a discrete, reusable code unit that performs a specific operation, such as installing a package, copying a file, or restarting a service. When a playbook runs a task, it invokes the named module on the target host; the module executes its logic, returns structured JSON data (including 'changed', 'failed', and results), and then is removed. Modules are the building blocks that act on the system, while playbooks orchestrate which modules run on which hosts.

  • Inventory: List of managed nodes in Ansible

    Why this is correct

    An Ansible Inventory is the explicit list of managed nodes (also called hosts) that Ansible can target, defined either statically in INI, YAML, or a script, or dynamically from cloud/CMDB sources. The inventory organizes hosts into groups and can attach per-host or per-group variables, enabling control over connection parameters like SSH users, ports, and Python interpreters. Without an inventory, Ansible has no set of nodes to execute modules or playbooks against, making it the foundational targeting mechanism.

  • Role: A structured way to group tasks, variables, and files

    Why this is correct

    An Ansible Role is a predefined, standardized directory layout (defaults, vars, tasks, files, templates, handlers, meta) that encapsulates related automation content into a reusable, shareable component. Roles decompose complex playbooks into smaller, modular units that can be loaded via the 'roles:' directive, allowing tasks, variables, files, and templates to be grouped together by function or application. This promotes code reuse across playbooks and environments, and supports Ansible Galaxy for distributing community roles.

About these practice questions

Courseiva writes every 200-301 question from scratch — 1,389 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or 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-301 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-301 exam.