
[2026年06月]更新のEX374試験問題集、EX374練習テスト問題
検証済みEX374問題集PDF資料 [2026]
質問 # 22
A teammate accidentally pushed sensitive data to the repository. Use an interactive rebase to remove the commit containing the sensitive data.
正解:
解説:
git rebase -i HEAD~3
# In the interactive editor, mark the commit with "d" to delete it, then save and exit.
Explanation:
Interactive rebasing enables modification of commit history, such as editing, squashing, or deleting commits, useful for fixing errors.
質問 # 23
Write a playbook to validate host connectivity in the combined inventory.
正解:
解説:
- name: Validate connectivity hosts: all
tasks:
- name: Ping hosts ping:
Explanation:
Testing host connectivity ensures that all hosts in the combined inventory are reachable and configured correctly.
質問 # 24
Configure web1 to use sudo for privilege escalation and run a playbook to display the hostname.
正解:
解説:
echo "ansible_become: yes" > host_vars/web1.yml
Playbook:
- name: Check hostname hosts: web1
tasks:
- command: hostname
Explanation:
The ansible_become variable enables privilege escalation for tasks requiring elevated permissions.
質問 # 25
Configure a playbook to use the inventory IP address directly and verify connectivity.
正解:
解説:
- name: Verify connectivity hosts: "{{ ansible_host }}" tasks:
- ping:
Explanation:
Dynamic host referencing allows direct use of inventory values, making playbooks adaptable to inventory changes.
質問 # 26
Inspect the logs of an EE build process.
正解:
解説:
podman logs $(podman ps -aq --filter ancestor=my_execution_env:1.0)
Explanation:
Inspecting logs helps troubleshoot issues that occur during the build process, ensuring a functional EE.
質問 # 27
Undo changes made to config.txt before staging the file.
正解:
解説:
git checkout -- config.txt
Explanation:
git checkout -- <file> reverts changes in the working directory to the last committed state.
質問 # 28
Analyze logs of an EE job run in Automation Controller.
正解:
解説:
1. Navigate to Jobs in Automation Controller.
2. Open the job details for the executed playbook.
3. View the logs for task outputs and errors.
Explanation:
Job logs provide insights into the execution flow and help debug issues within the EE.
質問 # 29
Set up a project in Automation Controller to pull content from Automation Hub.
正解:
解説:
1. Go to Projects.
2. Create a new project:
o Name: Automation Hub Project
o Source Control Type: Automation Hub
o URL: https://automation-hub.example.com/
3. Sync the project.
Explanation:
Pulling content from Automation Hub ensures the latest roles and playbooks are available for use.
質問 # 30
Verify the integrity of a built collection before publishing.
正解:
解説:
ansible-galaxy collection verify my_namespace-my_collection-1.0.0.tar.gz
Explanation:
The verify command ensures that the collection meets all required standards and is valid for publishing.
質問 # 31
Configure a playbook to run on a specific IP address instead of the host name defined in the inventory.
正解:
解説:
# playbook.yml
- name: Ping specific host hosts: 192.168.1.10 tasks:
- ping:
Explanation:
Specifying an IP directly overrides inventory naming, providing flexibility for ad-hoc runs or testing specific hosts.
質問 # 32
Use block to group tasks and apply privilege escalation only to the group.
正解:
解説:
- name: Block example hosts: all
tasks:
- block:
- name: Update package cache apt:
update_cache: yes
- name: Install nginx
apt:
name: nginx
state: present
become: yes
Explanation:
Blocks apply common parameters like become to grouped tasks, reducing repetition and improving clarity.
質問 # 33
Run a task on a different host than the one defined in the inventory using delegate_to.
正解:
解説:
- name: Delegate task to another host hosts: web1
tasks:
- name: Run a command on db1
command: uptime
delegate_to: db1
Explanation:
The delegate_to keyword ensures the task is executed on db1, even if the play is targeting web1. This is useful for tasks requiring resources or operations on another host.
質問 # 34
Run a task on localhost but save its output in the context of web1.
正解:
解説:
- name: Local execution with remote context hosts: web1
tasks:
- name: Execute locally
command: echo "Local task output"
delegate_to: localhost
register: local_output
- name: Display output debug:
var: local_output
Explanation:
This setup retains control node task output within the delegating host's scope, enabling contextual analysis.
質問 # 35
You are asked to pull the latest changes from the main branch of the remote repository into your local branch. Perform this operation.
正解:
解説:
git pull origin main
Explanation:
Pulling updates the local branch with the latest remote changes, merging any new commits into your local repository.
質問 # 36
Split db1 variables into multiple files: db1_connection.yml and db1_settings.yml. Include connection details and custom database settings.
正解:
解説:
echo "ansible_user: dbadmin" > host_vars/db1_connection.yml
echo "db_name: my_database" > host_vars/db1_settings.yml
Explanation:
Splitting variables into logical files enhances modularity and improves clarity for managing complex configurations.
質問 # 37
Inspect the file system of the EE container image.
正解:
解説:
podman run --rm -it my_execution_env:1.0 sh
Explanation:
Starting an interactive shell inside the EE allows inspection of its file system, aiding in troubleshooting or
customization.
質問 # 38
Package the collection into a .tar.gz file for distribution.
正解:
解説:
ansible-galaxy collection build my_namespace/my_collection
Explanation:
The build command packages the collection, creating a compressed file ready for sharing or publishing.
質問 # 39
Push your changes from the feature-update branch to the remote repository.
正解:
解説:
git push origin feature-update
Explanation:
Pushing ensures the local changes are reflected in the remote repository, allowing collaboration and backup of the branch.
質問 # 40
Create a playbook to skip tasks for hosts with ansible_distribution set to CentOS.
正解:
解説:
- name: Skip CentOS hosts: all
tasks:
- name: Run on non-CentOS debug:
msg: "This is not CentOS"
when: ansible_facts['distribution'] != "CentOS"
Explanation:
Skipping tasks based on conditions ensures compatibility and avoids unnecessary errors on unsupported hosts.
質問 # 41
......
最新のEX374実際の無料試験問題は更新された300問あります:https://www.passtest.jp/RedHat/EX374-shiken.html
無料EX374試験ブレーン問題集認定ガイド問題と解答:https://drive.google.com/open?id=1OTCIvKdg6okNu0mtWMyEKHzNO3eTpVjg