EX294 Manage inventories and credentials Practice Question
An administrator manages a mixed fleet of Linux servers and Windows servers using Ansible Automation Platform. The Linux hosts are accessed via SSH keys, while the Windows hosts require WinRM with username and password. The administrator wants to define connection credentials in an inventory file so that playbooks can target both groups without specifying credentials in the playbook. Which inventory variable should be used to set the username for WinRM connections?
⚠ Common exam trap
The trap here is assuming that a WinRM-specific variable like ansible_winrm_user is required, when Ansible uses the generic ansible_user for all connection types.
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_user
The ansible_user inventory variable sets the remote username for all connection types, including WinRM. For Windows hosts, ansible_user and ansible_password are used with the winrm connection plugin. Defining these in group_vars ensures credentials are applied consistently without modifying playbooks.
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_ssh_user
Why it's wrong here
ansible_ssh_user is an older variable that specifically applies to SSH connections. It is not used for WinRM connections. Since the Windows hosts require WinRM, this variable would be ignored, and the connection would fail due to missing credentials. The administrator should use ansible_user instead.
- ✓
ansible_user
Why this is correct
ansible_user is the correct inventory variable to specify the username for a connection. For Windows hosts using WinRM, Ansible uses ansible_user to set the remote username, and ansible_password for the password. This allows the administrator to define credentials at the inventory level, such as in group_vars/windows.yml, without embedding them in playbooks.
- ✗
ansible_connection_user
Why it's wrong here
ansible_connection_user does not exist in Ansible. Connection-related variables follow specific patterns like ansible_user, ansible_password, ansible_port, etc. This fictional variable would not be recognized by Ansible, leading to connection failures when the playbook attempts to authenticate to the Windows hosts.
- ✗
ansible_winrm_user
Why it's wrong here
ansible_winrm_user is not a valid Ansible inventory variable. While some connection plugins have specific variables, the username for WinRM is set via the generic ansible_user variable. Using an invalid variable would result in an undefined variable error or being ignored, causing authentication failure.
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 and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Red Hat exam blueprint
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.