EX374 Online Practice Questions

Home / RedHat / EX374

Latest EX374 Exam Practice Questions

The practice questions for EX374 exam was last updated on 2026-02-24 .

Viewing page 1 out of 22 pages.

Viewing questions 1 out of 114 questions.

Question#1

Write a playbook to verify if all hosts in the staging group have an accessible HTTP port (http_port).

A. - name: Verify HTTP port hosts: staging
tasks:
- debug:
msg: "Host {{ inventory_hostname }} is using HTTP port {{ http_port }}"

Explanation:
Playbooks accessing group variables verify configurations, such as application ports, across a group.

Question#2

Use the lookup plugin to read multiple lines from a file into a list.

A. - name: Read lines hosts: localhost tasks:
- name: Fetch lines set_fact:
lines: "{{ lookup('file', '/tmp/example.txt').splitlines() }}"
- debug:
var: lines

Explanation:
The splitlines method separates file content into individual lines, storing them as list elements.

Question#3

Upload the EE to Red Hat Automation Hub.

A. ansible-builder push --tag automation-hub.example.com/my_execution_env:1.0

Explanation:
Uploading the EE to Automation Hub allows centralized management and sharing of the environment within an organization.

Question#4

Validate if a variable my_ip contains a valid IP address using a filter.

A. - name: Validate IP address hosts: localhost
vars:
my_ip: "192.168.1.1" tasks:
- name: Check if IP is valid
fail:
msg: "Invalid IP address"
when: my_ip | ipaddr is not defined

Explanation:
The ipaddr filter checks if a variable contains a valid IP address, ensuring proper network data validation.

Question#5

Run a command on the control node but store the result in the context of a managed host.

A. - name: Store control node result hosts: web1
tasks:
- name: Get disk usage on control node
command: df -h
delegate_to: localhost
register: disk_usage
- name: Show disk usage debug:
var: disk_usage

Explanation:
This task demonstrates delegating commands to the control node while retaining results within the managed host's context.

Disclaimer

This page is for educational and exam preparation reference only. It is not affiliated with RedHat, Red Hat Certified Specialist in Developing Automation with Ansible Automation Platform, or the official exam provider. Candidates should refer to official documentation and training for authoritative information.

Exam Code: EX374Q & A: 300 Q&AsUpdated:  2026-02-24

  Get All EX374 Q&As