Courseiva
hardMultiple ChoiceObjective-mapped

XK0-006 Practice Question: Is migrating from a legacy automation tool to…

An organization is migrating from a legacy automation tool to Ansible. Which of the following best describes the role of Ansible playbooks in configuration management?

⚠ Common exam trap

It's easy for candidates to confuse playbooks with ad-hoc commands or inventory files, as candidates often think playbooks are scripts that execute directly on nodes rather than declarative YAML files that define desired state and tasks.

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

YAML files that declare the desired state of systems and tasks to achieve it.

Ansible playbooks are YAML files that declare the desired state of systems and the tasks to achieve that state, making them the core configuration management tool in Ansible. They are idempotent, meaning running them multiple times yields the same result, and they use modules to enforce configurations without requiring an agent on managed nodes.

Answer analysis

Option-by-option breakdown

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

  • YAML files that declare the desired state of systems and tasks to achieve it.

    Why this is correct

    Defines tasks and states declaratively.

  • Executable scripts written in Python that run on managed nodes.

    Why it's wrong here

    Ansible playbooks are YAML, not Python executables.

  • Configuration files that list the inventory of managed hosts.

    Why it's wrong here

    Inventory is separate; playbooks define tasks.

  • Shell scripts that execute ad-hoc commands across servers.

    Why it's wrong here

    Ad-hoc commands are different from playbooks.

About these practice questions

One of 979 original XK0-006 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 XK0-006 practice question is part of Courseiva's free CompTIA 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 XK0-006 exam.