Independence Day Deal! Unlock 25% OFF Today – Limited-Time Offer - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

RedHat Exam EX294 Topic 8 Question 47 Discussion

Actual exam question for RedHat's EX294 exam
Question #: 47
Topic #: 8
[All EX294 Questions]

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 called index.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 name and 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.

Show Suggested Answer Hide Answer
Suggested Answer: A

Contribute your Thoughts:

Avery
1 months ago
This is a solid solution. The only thing I'd add is a comment in the index.html.j2 template to explain the use of the Ansible facts. Keeps it readable for future maintainers.
upvoted 0 times
Artie
13 days ago
Yes, clear comments can make a big difference in understanding the code later on.
upvoted 0 times
...
Ty
1 months ago
I agree, documentation is key for maintaining code in the long run.
upvoted 0 times
...
Sheron
1 months ago
That's a good point, adding a comment for future maintainers is always helpful.
upvoted 0 times
...
...
Stephane
2 months ago
Haha, I wonder if the FQDN and IP address will actually match the node's details. Better double-check that Ansible fact usage!
upvoted 0 times
Shawnda
8 days ago
User 4: Let's make sure everything is configured correctly before running it.
upvoted 0 times
...
Tamala
18 days ago
User 3: The playbook and role setup looks good though.
upvoted 0 times
...
Peggy
1 months ago
User 2: Yeah, we should double-check the Ansible facts.
upvoted 0 times
...
Levi
2 months ago
User 1: I hope the FQDN and IP address match the node's details.
upvoted 0 times
...
...
William
2 months ago
Hold on, does the firewall really need to be enabled and started? Seems like an unnecessary step for a simple web server setup.
upvoted 0 times
...
Trina
2 months ago
I feel confident about it, I have practiced similar tasks before.
upvoted 0 times
...
Brent
2 months ago
Looks good! The role and playbook seem well-structured, and the template for the index.html file looks perfect. Can't wait to see it in action!
upvoted 0 times
Xuan
2 months ago
User 2: I'm excited to see it work too. The template for the index.html file looks great!
upvoted 0 times
...
Shelton
2 months ago
User 1: Thanks! I spent some time making sure everything was set up correctly.
upvoted 0 times
...
...
Destiny
2 months ago
I agree, setting up all those tasks in ansible roles can be tricky.
upvoted 0 times
...
Shanda
3 months ago
I think this question is quite challenging.
upvoted 0 times
...

Save Cancel
az-700  pass4success  az-104  200-301  200-201  cissp  350-401  350-201  350-501  350-601  350-801  350-901  az-720  az-305  pl-300  

Warning: Cannot modify header information - headers already sent by (output started at /pass.php:70) in /pass.php on line 77