mediumMultiple ChoiceObjective-mapped
XK0-006 Ansible control node requirements Practice Question
An Ansible playbook includes the following task: 'ansible.builtin.service: name=nginx state=restarted'. However, the playbook fails with 'module not found'. What is the most likely cause?
⚠ Common exam trap
The trap is to assume that the module name is incorrect because 'service' seems generic. However, 'ansible.builtin.service' is a valid module. The real cause is more fundamental: the control node must have Python installed to run modules.
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 control node does not have Python installed.
The error 'module not found' indicates that Ansible cannot locate the module file or its dependencies on the control node. The module 'ansible.builtin.service' is a valid and standard module, so the error is not due to the module name. If the control node does not have Python installed, Ansible cannot execute any Python-based modules, resulting in a 'module not found' error because the module interpreter is missing. This is a fundamental requirement for Ansible operation.
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 playbook is not in the correct directory.
Why it's wrong here
Incorrect. The directory of the playbook does not affect module loading. The playbook will be found regardless of its location when executed correctly.
- ✗
The module name uses the wrong FQCN. The correct module is 'ansible.builtin.systemd_service'.
Why it's wrong here
Incorrect. The module 'ansible.builtin.service' does exist in the ansible.builtin collection and is a valid module. This claim is factually incorrect.
- ✗
The target host does not have nginx installed.
Why it's wrong here
Incorrect. The target host not having nginx installed would cause a service-specific error, not a 'module not found' error.
- ✓
The control node does not have Python installed.
Why this is correct
Correct. The control node requires Python to run Ansible modules. Without Python, the control node cannot find or execute the module, resulting in a 'module not found' error.
Go deeper
Related to this question
About these practice questions
Courseiva writes every XK0-006 question from scratch — 979 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 →
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.