Courseiva

EX294 Practice Question: Create content collections and execution environments

An organization uses a private Automation Hub. A user has configured the server in ansible.cfg. Which command installs a collection from this server?

⚠ Common exam trap

Watch out — candidates often think they need to specify the server URL or API key on the command line, but the EX294 exam expects you to know that the server is pre-configured in ansible.cfg, so only the collection name is required.

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 my_namespace.my_collection

When the Automation Hub server is already configured in ansible.cfg under the [galaxy] section with the server_url and auth_url, the ansible-galaxy collection install command will automatically use that server and its authentication. No additional flags are needed; the command simply specifies the collection name in the format namespace.collection.

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-galaxy collection install my_namespace.my_collection --api-key=mykey

    Why it's wrong here

    --api-key supplies a token for the Galaxy API but does not specify which server to contact, so the command still queries the default configured endpoint. API keys are used alongside a server URL when authenticating to Automation Hub, not as a substitute for identifying the private hub.

  • ✗

    ansible-galaxy collection install my_namespace.my_collection --server=https://privatehub.example.com

    Why it's wrong here

    The `--server` flag overrides the configured Galaxy server URL, but `ansible-galaxy collection install` reads the private Automation Hub endpoint from `ansible.cfg`'s `[galaxy_server.*]` sections, so no flag is needed. The flag suits one-off installs against an unconfigured Galaxy or Automation Hub instance.

  • ✗

    ansible-galaxy collection download my_namespace.my_collection

    Why it's wrong here

    The download subcommand retrieves a collection tarball to the local filesystem for offline distribution; it does not install anything into the configured collections path. Installation from a private Automation Hub requires ansible-galaxy collection install, which resolves and places the collection. Download is correct when staging artefacts for air-gapped transfer.

  • ✓

    ansible-galaxy collection install my_namespace.my_collection

    Why this is correct

    Once the private Automation Hub server is configured in ansible.cfg, ansible-galaxy resolves the collection from that configured source automatically, so the standard install command with the fully qualified collection name retrieves it without extra flags.

About these practice questions

One of 392 original EX294 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 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.