EX294 Practice Question: Create content collections and execution environments
A user wants to use a collection from Automation Hub. Which command downloads and installs the collection to the default collections path?
⚠ Common exam trap
It's easy for candidates to confuse the `ansible-galaxy` command with other Ansible executables like `ansible-playbook` or `ansible-pull`, or assume a non-existent command like `ansible-collection` exists, because the exam tests precise knowledge of which tool handles collection management.
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
✓
ansible-galaxy collection install
The correct command to download and install a collection from Automation Hub to the default collections path is `ansible-galaxy collection install`. This command uses the `ansible-galaxy` utility, which is the standard tool for managing Ansible roles and collections, and the `collection install` subcommand specifically handles collection installation from configured sources like Automation Hub or Ansible Galaxy.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
ansible-pull collection install
Why it's wrong here
ansible-pull retrieves a playbook repository from Git and runs it locally; it has no collection install subcommand. Its name suggests fetching remote content, which tempts, but collection installation from Automation Hub is performed by ansible-galaxy collection install into the default path.
- ✗
ansible-playbook collection install
Why it's wrong here
ansible-playbook executes playbooks and has no collection subcommand, so it cannot download or install anything. Its familiarity as the everyday Ansible command makes it tempting, yet collection installation requires ansible-galaxy collection install, which handles Automation Hub tokens and the default collections path.
- ✗
ansible-collection install
Why it's wrong here
No ansible-collection executable exists; collections are managed through ansible-galaxy, which downloads from Automation Hub and installs to the default path. The hyphenated name mimics ansible-galaxy's structure, making it tempting, but invoking it returns command-not-found rather than installing anything.
- ✓
ansible-galaxy collection install
Why this is correct
ansible-galaxy collection install resolves and downloads the named collection from the configured Automation Hub server, placing it under the default collections path (~/.ansible/collections). It performs both retrieval and installation in one command, satisfying the requirement.
Go deeper
Related to this question
About these practice questions
This EX294 question is part of Courseiva's 392-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 →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This EX294 practice question is part of Courseiva's free Red Hat 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 EX294 exam.