Question 269 of 518
Transform data with filters and pluginshardMultiple ChoiceObjective-mapped

EX294 Transform data with filters and plugins Practice Question

This EX294 practice question tests your understanding of transform data with filters and plugins. Read the scenario carefully and evaluate each option against the stated constraints before committing to an answer. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

A company manages a large infrastructure of 10,000 servers using Ansible. The Ansible control node runs on a powerful machine with 32 cores and 64GB RAM. Recently, a playbook that processes server facts and generates a compliance report has become extremely slow, taking over 6 hours to complete. The playbook uses several `set_fact` tasks with complex jinja2 filters including `selectattr`, `map`, `json_query`, and `combine`. The inventory is stored in a dynamic inventory script that returns JSON. The team suspects that the filter operations are causing performance bottlenecks, especially when creating large data structures. A junior engineer suggests splitting the playbook into multiple plays and using `delegate_to` to distribute processing across managed nodes. Another suggests using the `ansible.builtin` module instead of filters. The senior architect recommends converting the heavy filter logic into a custom action plugin. What is the most effective approach to significantly reduce the execution time while maintaining functionality?

Question 1hardmultiple choice
Read the full Ansible explanation →

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

Convert the heavy filter logic into a custom Python action plugin that runs on the control node and performs data transformation efficiently.

Option C is correct because custom action plugins execute Python code directly on the control node, bypassing the Jinja2 templating engine entirely. This eliminates the overhead of parsing complex filters like `json_query` and `combine` for every host, which is the primary bottleneck when processing large data structures across 10,000 servers. Action plugins also have full access to Ansible's internal APIs, allowing efficient in-memory data transformations without the serialization/deserialization costs of `set_fact`.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Distribute the processing across managed nodes using `delegate_to` and loop over hosts.

    Why it's wrong here

    Delegation adds network overhead; not designed for heavy data processing.

  • Use `ansible.builtin` modules to replace filter operations; for example, use `add_host` and `group_by` to structure data.

    Why it's wrong here

    Modules cannot efficiently replace complex data transformations.

  • Convert the heavy filter logic into a custom Python action plugin that runs on the control node and performs data transformation efficiently.

    Why this is correct

    Action plugins run natively in Python, bypassing Jinja2 overhead.

    Related concept

    Read the scenario before looking for a memorised answer.

  • Use `with_items` and `with_nested` loops instead of filters, as loops are faster.

    Why it's wrong here

    Loops are generally slower than filters in Ansible.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates assume `delegate_to` or `ansible.builtin` modules are general-purpose performance fixes, when in fact the bottleneck is the Jinja2 filter evaluation on the control node, which only a custom plugin or module can bypass.

Detailed technical explanation

How to think about this question

Custom action plugins run as Python code on the control node and can use libraries like `jmespath` directly for `json_query`-like operations, avoiding the Jinja2 sandbox and template compilation overhead. Under the hood, `set_fact` with filters forces Ansible to evaluate Jinja2 expressions for each host individually, which becomes a CPU-bound bottleneck at scale; an action plugin can process all host facts in a single Python loop using native data structures. In real-world scenarios, this approach can reduce execution time from hours to minutes for large inventories, as seen in environments like Red Hat Satellite or cloud provisioning pipelines.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A small business has 20 workstations on the 192.168.1.0/24 network and one public IP from its ISP. The router uses PAT (NAT overload) so all 20 devices share one public address using different source ports. NAT questions test whether you understand the four address terms and which direction each translation applies.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related EX294 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free EX294 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this EX294 question test?

Transform data with filters and plugins — This question tests Transform data with filters and plugins — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: Convert the heavy filter logic into a custom Python action plugin that runs on the control node and performs data transformation efficiently. — Option C is correct because custom action plugins execute Python code directly on the control node, bypassing the Jinja2 templating engine entirely. This eliminates the overhead of parsing complex filters like `json_query` and `combine` for every host, which is the primary bottleneck when processing large data structures across 10,000 servers. Action plugins also have full access to Ansible's internal APIs, allowing efficient in-memory data transformations without the serialization/deserialization costs of `set_fact`.

What should I do if I get this EX294 question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 25, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

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.