EX294 Dumps

EX294 Free Practice Test

Red-Hat EX294: Red Hat Certified Engineer (RHCE) exam

QUESTION 6

Create a role called sample-apache in /home/sandy/ansible/roles that enables and starts httpd, enables and starts the firewall and allows the webserver service. Create a template calledindex.html.j2 which creates and serves a message from /var/www/html/index.html Whenever the content of the file changes, restart the webserver service.
Welcome to [FQDN] on [IP]
Replace the FQDN with the fully qualified domain nameand IP with the ip address of the node using ansible facts. Lastly, create a playbook in /home/sandy/ansible/ called apache.yml and use the role to serve the index file on webserver hosts.
Solution:
/home/sandy/ansible/apache.yml
EX294 dumps exhibit
/home/sandy/ansible/roles/sample-apache/tasks/main.yml
EX294 dumps exhibit
/home/sandy/ansible/roles/sample-apache/templates/index.html.j2
EX294 dumps exhibit
In /home/sandy/ansible/roles/sample-apache/handlers/main.yml
EX294 dumps exhibit

Does this meet the goal?

Correct Answer: A