Red Hat Certified Specialist In Developing Automation With Ansible Automation Pl Free Sample Questions

12 free sample questions120 in the full practice test

Try simulator

EX374 Sample Questions

  1. Question 1

    Intermediate

    Manage automation controller · Run playbooks in automation controller

    You are the Senior Automation Architect for a financial institution. You are designing a complex Automation Controller workflow to patch Linux servers. The workflow must adhere to the following logic:

    1. Step A: Check current system load.
    2. Step B: If Step A succeeds, proceed to patch the system.
    3. Step C: If Step A fails (load too high), create a ticket in the ITSM system.
    4. Step D: Regardless of whether the system was patched or a ticket was created, send a final notification to the operations team.

    Which workflow configuration best achieves this logic?

    Answer and explanation

    Correct answer: C

    In Ansible Automation Controller workflows, transitions determine the flow based on the result of the previous node. An 'Always' transition ensures that the target node executes regardless of the source node's status (success or failure). By linking both the success path (Step B) and failure path (Step C) to Step D with 'Always', you guarantee the notification runs in both scenarios.

    graph TD A[Step A: Check Load] -->|Success| B[Step B: Patch] A -->|Failure| C[Step C: Ticket] B -->|Always| D[Step D: Notify] C -->|Always| D
  2. Question 2

    Intermediate

    Manage execution environments · Build an execution environment

    You are building a custom Execution Environment (EE) using ansible-builder version 3. You have a requirement to install a specific binary package, libxml2-dev, at the operating system level, and a Python library, lxml, via pip.

    Which file should you create to define the OS-level dependencies, and how is it referenced in the execution-environment.yml?

    Answer and explanation

    Correct answer: D

    Ansible Builder uses bindep.txt to define system-level (RPM/Deb) dependencies. In the execution-environment.yml definition file, this is referenced under the dependencies section using the system key. Python dependencies go in requirements.txt referenced by the python key.

  3. Question 3

    Advanced

    Delegate tasks · Run a task for a managed host on a different host

    A developer is writing a playbook that needs to push a configuration file to a remote server. However, the content of this file is generated by querying a local database on the control node.

    Which combination of task configuration is required to ensure the database query runs locally, but the file creation happens on the remote target?

    Answer and explanation

    Correct answer: D

    Lookup plugins in Ansible ALWAYS execute on the control node (localhost). By using a lookup to fetch data (e.g., lookup('community.general.postgresql_query', ...)), the data is retrieved locally. You can then use the copy module with the content parameter (populated by the lookup) to write the file on the remote host. No delegate_to is needed for the task itself because the file write action must happen on the target.

  4. Question 4

    Intermediate

    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 under ungrouped.

    Which configuration in your aws_ec2.yml plugin file achieves this?

    Answer and explanation

    Correct answer: A

    The keyed_groups option allows you to create groups based on the values of variables (in this case, tags). By specifying key: tags.Environment, the plugin will create groups like env_production or env_staging. If the key does not exist for a host, that host is simply not added to a keyed group (effectively remaining in ungrouped or all depending on context), satisfying the requirement.

  5. Question 5

    Beginner

    Understand and use Git · Clone a Git repository

    You are reviewing a playbook that uses the ansible.builtin.git module. You notice the update parameter is set to no.

    What is the specific effect of this configuration when the playbook runs multiple times?

    Answer and explanation

    Correct answer: C

    When update: no is 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.

  6. Question 6

    Advanced

    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 active and have a speed greater than 500.

    Which Jinja2 filter chain produces the correct list ['eth0']?

    Answer and 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.

Register free for 6 more questions

Or unlock all 120 EX374 questions with explanations, timed mode and flashcards.