EX294 Sandy Practice Questions
The free EX294: Red Hat Certified Engineer (RHCE) questions that deal with sandy, with answers and explanations. The full bank and the timed practice test cover every topic the exam asks about.
Question #2
Create a file called requirements.yml in /home/sandy/ansible/roles to install two roles. The source for the first role is geerlingguy.haproxy and geerlingguy.php. Name the first haproxy-role and the second php-role. The roles should be installed in /home/sandy/ansible/roles.
Type your answer, then reveal.
Correct answer: - src: geerlingguy.haproxy name: haproxy-role; - src: geerlingguy.php_role name: php_role

Explanation
in /home/sandy/ansible/roles vim requirements.yml Run the requirements file from the roles directory: ansible-galaxy install -r requirements.yml -p /home/sandy/ansible/roles
Question #4
Create a file called requirements.yml in /home/sandy/ansible/roles a file called role.yml in /home/sandy/ansible/. The haproxy-role should be used on the proxy host. And when you curl http://node3.example.com it should display "Welcome to node4.example.com" and when you curl again "Welcome to node5.example.com" The php-role should be used on the prod host.
Type your answer, then reveal.
Correct answer: hosts: all; vars haproxy_backend_servers: name web1 address node4.example.com, name web2 address node5.example.com; tasks: include_role haproxy-role when "proxy" in group_names; include_role php-role when "prod" in group_names

Explanation
Solution as: Check the proxy host by curl http://node3.example.com
All EX294: Red Hat Certified Engineer (RHCE) practice questions →
