Red Hat Certified Specialist in Developing Automation with Ansible Automation Platform exam 온라인 연습
최종 업데이트 시간: 2025년06월06일
당신은 온라인 연습 문제를 통해 RedHat EX374 시험지식에 대해 자신이 어떻게 알고 있는지 파악한 후 시험 참가 신청 여부를 결정할 수 있다.
시험을 100% 합격하고 시험 준비 시간을 35% 절약하기를 바라며 EX374 덤프 (최신 실제 시험 문제)를 사용 선택하여 현재 최신 300개의 시험 문제와 답을 포함하십시오.
정답: # inventory.yml
web1:
ansible_host: 192.168.1.10
hostname: web1.example.com
Explanation:
Using ansible_host for SSH and a custom variable like hostname enables flexible host identification for different use cases.
정답: - name: Verify HTTP port hosts: staging
tasks:
- debug:
msg: "Host {{ inventory_hostname }} is using HTTP port {{ http_port }}"
Explanation:
Playbooks accessing group variables verify configurations, such as application ports, across a group.
정답: mkdir -p custom_inventory
echo "[web_servers]" > custom_inventory/inventory.ini
echo "web1 ansible_host=192.168.1.10" >> custom_inventory/inventory.ini ansible-playbook -i custom_inventory playbook.yml
Explanation:
Custom inventory directories organize host definitions for easier management, especially in large-scale deployments.
정답: echo "ansible_connection: paramiko" > host_vars/web1.yml
Explanation:
The ansible_connection variable specifies the connection backend, useful for handling specific infrastructure constraints.
정답: # host_vars/web1.yml ansible_host: 192.168.1.10 ansible_ipv6_address: "2001:db8::1" Playbook:
- name: Use IPv4 or IPv6 hosts: web1
tasks:
- debug:
msg: "{{ ansible_ipv6_address if ansible_ipv6_address else ansible_host }}"
Explanation:
Defining multiple addresses and using conditional logic allows flexibility for dual-stack environments.
정답: # inventory.yml
staging:
hosts:
web1:
web2:
vars:
http_port: 8080
production:
hosts:
web3:
Explanation:
Group-level variables apply uniformly to all hosts within a group, ensuring consistent configurations across environments.
정답: # playbook.yml
- name: Retrieve ansible_host hosts: web1
tasks:
- debug:
var: ansible_host
Explanation:
Dynamic variable retrieval helps validate host-level settings such as IP addresses or DNS names.
정답: 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.
정답: # playbook.yml
- name: Test connection with overridden SSH port hosts: web1
tasks:
- ping:
Execution:
ansible-playbook -i inventory.yml playbook.yml -e "ansible_port=2022"
Explanation:
Passing ansible_port as an extra variable ensures runtime overrides without altering the inventory.
정답: mkdir -p host_vars
echo "ansible_user: dbadmin" > host_vars/db1.yml
echo "ansible_ssh_private_key_file: ~/.ssh/db_key" >> host_vars/db1.yml
Explanation:
Using host_vars allows granular control of variables, such as user credentials and SSH keys, for individual hosts.
정답: # host_vars/web1.yml
ansible_ssh_private_key_file: ~/.ssh/web1_key
Explanation:
Defining ansible_ssh_private_key_file ensures secure, host-specific authentication, vital for multi-host environments.
정답: ansible-inventory -i inventory.yml --host web1
Explanation:
This command retrieves detailed information about host variables, verifying correctness and debugging issues.
정답: # inventory.yml
staging:
hosts:
web1:
ansible_host: 192.168.1.11 production:
hosts:
web1:
ansible_host: 192.168.1.20
Explanation:
Environment-specific inventories simplify deployments and maintenance across diverse infrastructure setups.
정답: echo "ansible_user: webadmin" > group_vars/web_servers.yml
Explanation:
Defining group-level variables overrides individual host settings, ensuring uniformity across similar hosts.
정답: # host_vars/web1.yml ansible_connection: ssh
Explanation:
The ansible_connection variable defines the protocol for communicating with hosts, useful for automation adjustments.