Red Hat Certified Engineer (RHCE) exam Free Sample Questions

Description

Covers RHCSA foundation skills, Git integration in VS Code, Ansible inventories, modules and variables, configuring managed nodes and running playbooks with ansible-navigator, and roles.

12 free sample questions156 in the full practice test

Try simulator

EX294 Sample Questions

  1. Question 1

    Beginner

    RHCSA Foundation Skills · Operate running systems

    A system administrator is writing a playbook to ensure a critical monitoring service, 'monitord', is not only started but also configured to launch automatically when the server reboots. The administrator uses the ansible.builtin.service module. Which combination of parameters ensures both requirements are met?

    Answer and explanation

    Correct answer: C

    The state=started parameter ensures the service is currently running. The enabled=yes (or enabled=true) parameter ensures the service is enabled in systemd to start at boot time. 'persistent' is not a valid parameter, and 'running' is not the standard state value (though 'started' is preferred).

  2. Question 2

    Intermediate

    RHCSA Foundation Skills · Configure local storage

    You are automating the configuration of Logical Volume Management (LVM) on a new RHEL 9 server. You need to expand an existing volume group 'vg_data' by adding a new physical volume /dev/sdb1. Which Ansible module is specifically designed to manage the properties and physical volumes of a volume group?

    Answer and explanation

    Correct answer: B

    The community.general.lvg module is used to configure volume groups, including adding or removing physical volumes (pvs). The lvol module is for logical volumes, and filesystem is for formatting.

  3. Question 3

    Intermediate

    RHCSA Foundation Skills · Manage security

    A playbook copies a custom HTML file to /var/www/html/index.html on a web server, but Apache returns a 403 Forbidden error when trying to access it. The file permissions are correct (644). What is the most likely cause and the appropriate Ansible module to fix it permanently?

    Answer and explanation

    Correct answer: B

    If permissions are correct but a 403 occurs on RHEL, it is often an SELinux context mismatch. The file likely has admin_home_t or default_t instead of httpd_sys_content_t. The sefcontext module updates the policy, and a restore trigger applies it.

  4. Question 4

    Intermediate

    RHCSA Foundation Skills · Manage security

    True or False: When using the ansible.posix.firewalld module to open a port, specifying permanent: yes creates a persistent rule but does not immediately apply it to the running configuration unless immediate: yes is also specified.

    Answer and explanation

    Correct answer: A

    This is true. The permanent: yes option modifies the on-disk configuration. To affect the runtime state without a reload, immediate: yes must be used.

  5. Question 5

    Beginner

    RHCSA Foundation Skills · Manage users and groups

    You need to create a user 'deployer' with a specific User ID (UID) of 2005 and ensure they are added to the 'wheel' group for administrative access. Which task definition achieves this?

    Answer and explanation

    Correct answer: A

    This task uses the correct uid parameter and adds the user to the 'wheel' group. append: yes is best practice to avoid removing the user from other groups.

  6. Question 6

    Beginner

    Visual Studio Code and Git Integration · Create playbooks and push them to a GIT repository

    You are using Visual Studio Code to develop Ansible playbooks. You have made changes to site.yml and need to commit these changes to your local Git repository. Using the VS Code interface or terminal, what is the correct sequence of Git operations?

    Answer and explanation

    Correct answer: D

    In Git, you must first stage the modified files (git add), then commit them to the local history (git commit), and finally push them to the remote repository (git push). VS Code follows this same logical flow in its Source Control panel.

Register free for 6 more questions

Or unlock all 156 EX294 questions with explanations, timed mode and flashcards.