최신RedHat Red Hat Certified Specialist in Developing Automation with Ansible Automation Platform - EX374무료샘플문제

문제1
Use advanced inventory variables in a playbook.
정답:
- name: Use advanced inventory hosts: web1
tasks:
- debug:
msg: "Web server running on port {{ http_port }}"
Explanation:
Referencing host-specific variables ensures tasks adapt dynamically to inventory data.
문제2
Verify that an EE is compatible with a specific playbook.
정답:
podman run --rm -v $(pwd):/workspace -w /workspace my_execution_env:1.0 ansible-lint site.yml
Explanation:
Using ansible-lint inside the EE checks for compatibility and best practices in the playbook, ensuring reliability during execution.
문제3
Perform a health check on db1 from web1.
정답:
- name: Health check on db1 hosts: web1
tasks:
- name: Ping db1 ping: delegate_to: db1
Explanation:
Using the ping module with delegate_to, this task verifies the availability of db1 from web1.
문제4
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.
문제5
List all running containers for EE jobs on the control node.
정답:
podman ps --filter "ancestor=my_execution_env:1.0"
Explanation:
Listing running containers helps monitor active EE instances and ensures they are functioning as expected.
문제6
Execute a task on a remote host (db1) and use its output in a task on the current host.
정답:
- name: Use delegated output hosts: web1
tasks:
- name: Get uptime from db1
command: uptime
delegate_to: db1
register: db1_uptime
- name: Display db1 uptime on web1 debug:
msg: "Uptime of db1: {{ db1_uptime.stdout }}"
Explanation:
Storing the output of a delegated task in a variable allows its use in subsequent tasks, bridging operations across hosts.
문제7
Create a custom variable in group_vars to manage a unique property for web_servers.
정답:
echo "nginx_version: 1.18" > group_vars/web_servers.yml
Explanation:
Group variables customize configurations for all hosts in a group, centralizing shared settings like software versions.
문제8
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.
문제9
Use the query function to retrieve data from a dictionary and display it in a task.
정답:
- name: Query data from dictionary hosts: localhost
vars:
servers:
web: 192.168.1.10
db: 192.168.1.20 tasks:
- name: Retrieve web server IP set_fact:
web_ip: "{{ servers | query('dict', 'web') }}"
- debug:
var: web_ip
Explanation:
The query function retrieves values from complex data structures like dictionaries, enabling advanced data manipulation.
문제10
View the status of your local repository to determine untracked files and staged changes.
정답:
git status
Explanation:
git status shows the current state of the working directory and staging area, helping track changes.
문제11
Run a playbook with a different Ansible configuration file in an EE.
정답:
podman run --rm -v $(pwd):/workspace -w /workspace my_execution_env:1.0 ansible-playbook -e ANSIBLE_CONFIG=/workspace/ansible.cfg site.yml
Explanation:
Overriding the Ansible configuration file allows customization of playbook execution parameters within the EE.
문제12
Use a special variable to set a different remote user for web1 when executing a playbook.
정답:
# host_vars/web1.yml ansible_user: custom_user
Explanation:
Special variables like ansible_user dynamically override the remote user, adapting Ansible behavior per host.
문제13
Integrate an EE with a specific project in Automation Controller.
정답:
1. Go to Projects in Automation Controller.
2. Edit the project and assign the custom EE (registry.example.com/my_execution_env:1.0).
3. Save and test the integration with a Job Template.
Explanation:
Associating projects with specific EEs ensures tasks run in a controlled environment tailored to project requirements.
문제14
Use a dynamic inventory to filter hosts by a specific tag.
정답:
ansible-inventory -i aws_ec2.yml --host tag_web
Explanation:
Filtering hosts by tag ensures that only the relevant resources are targeted for playbook execution.
문제15
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.

KoreaDumps의 제품으로 GO GO GO !

자격증의 중요성:

경쟁율이 심한 IT시대에 인증시험을 패스함으로 IT업계 관련 직종에 종사하고자 하는 분들에게는 아주 큰 가산점이 될수 있고 자신만의 위치를 보장할수 있으며 더욱이는 한층 업된 삶을 누릴수 있을수도 있습니다.

KoreaDumps 제품의 가치:

KoreaDumps에는 IT인증시험의 최신 학습가이드가 있습니다. KoreaDumps의 IT전문가들이 자신만의 경험과 끊임없는 노력으로 최고의 학습자료를 작성해 여러분들이 시험에서 패스하도록 도와드립니다.

무료샘플 받아보기:

관심있는 인증시험과목 덤프의 무료샘플을 원하신다면 덤프구매사이트의 PDF Version Demo 버튼을 클릭하고 메일주소를 입력하시면 바로 다운받아 덤프의 일부분 문제를 체험해 보실수 있습니다.

완벽한 서비스 제공:

KoreaDumps는 한국어로 온라인상담과 메일상담을 받습니다. 덤프구매후 일년동안 무료 업데이트 서비스를 제공해드리며 구매일로 부터 60일내에 시험에서 떨어지는 경우 덤프비용 전액을 환불해드려 고객님의 부담을 덜어드립니다.