EX374 Sample Questions & Answers
Free Red Hat Certified Specialist In Developing Automation With Ansible Automation Pl practice questions with worked answers and explanations. See how the ExamJungle simulator prepares you — then jump into the full test.
Launch the full EX374 simulator →Showing 6 of 12 free samples.
- Question 1Intermediate
Manage inventories and credentials · Create a dynamic inventory
You are managing a dynamic inventory sourced from AWS. You need to group instances based on a custom tag
Environment. If the tag is missing, the host should be grouped underungrouped.Which configuration in your
aws_ec2.ymlplugin file achieves this?Show answer & explanation
Correct answer: A
The
keyed_groupsoption allows you to create groups based on the values of variables (in this case, tags). By specifyingkey: tags.Environment, the plugin will create groups likeenv_productionorenv_staging. If the key does not exist for a host, that host is simply not added to a keyed group (effectively remaining inungroupedoralldepending on context), satisfying the requirement. - Question 2Beginner
Understand and use Git · Clone a Git repository
You are reviewing a playbook that uses the
ansible.builtin.gitmodule. You notice theupdateparameter is set tono.What is the specific effect of this configuration when the playbook runs multiple times?
Show answer & explanation
Correct answer: C
When
update: nois set, the git module checks if the destination directory contains a git repository. If it does, the module stops and does not pull new changes. It only clones the repository if the destination is empty/missing. This is useful for 'clone once' scenarios. - Question 3Advanced
Transform data with filters and plugins · Inspect, validate, and manipulate variables
A system administrator needs to process a list of dictionaries containing network interface data.
Data structure:
[ {"name": "eth0", "active": true, "speed": 1000}, {"name": "eth1", "active": false, "speed": 1000}, {"name": "eth2", "active": true, "speed": 100} ]The goal is to extract ONLY the names of interfaces that are
activeand have aspeedgreater than 500.Which Jinja2 filter chain produces the correct list
['eth0']?Show answer & explanation
Correct answer: D
This chain correctly filters the list first by the 'active' attribute (must be true), then filters that result by the 'speed' attribute (must be greater than 500), and finally maps the result to extract only the 'name' attribute.
- Question 4Beginner
Manage content collections · Create a content collection
You have created a new Ansible Content Collection named
company.monitoring. You need to build the collection artifact to upload it to your private Automation Hub.Which command should you execute in the root directory of the collection?
Show answer & explanation
Correct answer: C
The
ansible-galaxy collection buildcommand packages the collection into a tarball (tar.gz) that is ready for distribution or upload to Galaxy/Automation Hub. - Question 5Intermediate
Manage inventory variables · Structure host and group variables
Which of the following variables has the HIGHEST precedence in Ansible when setting the value of
http_port?Show answer & explanation
Correct answer: C
Extra vars passed via the command line (
-e) always have the highest precedence in Ansible, overriding play vars, host vars, group vars, and role defaults.graph BT A[Role Defaults] --> B[Inventory Group Vars] B --> C[Inventory Host Vars] C --> D[Playbook Vars] D --> E[Extra Vars -e] style E fill:#f9f,stroke:#333,stroke-width:4px - Question 6IntermediateSelect 2
Manage task execution · Run selected tasks from a playbook
You are creating a playbook that performs maintenance on a cluster of web servers. You want to ensure that if the maintenance task fails on more than 30% of the hosts in the first batch, the entire playbook execution aborts immediately to prevent widespread outage.
Which settings should you apply to the play definition?
Show answer & explanation
Correct answers: A, C
To utilize
max_fail_percentageeffectively for batches, you must setserial. Ifserialis not set, Ansible runs on all hosts in parallel (up to forks), and max_fail_percentage applies to the whole set. To stop 'after the first batch', a batch size must be defined viaserial.The
max_fail_percentagesetting causes the play to abort if the percentage of failed hosts exceeds the threshold.
Ready for the real thing?
The full EX374 simulator has every exam-style question, timed mode, and instant scoring.