Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

RedHat Exam EX294 Topic 9 Question 42 Discussion

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

Create a role called apache in "/home/admin/ansible/roles" with the following

requirements:

--> The httpd package is installed, enabled on boot, and started.

--> The firewall is enabled and running with a rule to allow access to the web server.

--> template file index.html.j2 is used to create the file /var/www/html/index.html

with the output:

Welcome to HOSTNAME on IPADDRESS

--> Where HOSTNAME is the fqdn of the managed node and IPADDRESS is the IP-Address of

the managed node.

note: you have to create index.html.j2 file.

--> Create a playbook called httpd.yml that uses this role and the playbook runs on

hosts in the webservers host group.

Show Suggested Answer Hide Answer
Suggested Answer: A

Contribute your Thoughts:

Huey
2 months ago
Definitely, running syntax check and testing the URL is crucial.
upvoted 0 times
...
Evan
3 months ago
Good point! It's easy to overlook.
upvoted 0 times
...
Laila
3 months ago
Makes creating the structure easier.
upvoted 0 times
...
Evelynn
3 months ago
True, firewalld can be tricky.
upvoted 0 times
...
Holley
4 months ago
Yeah, but don't forget creating the template file!
upvoted 0 times
...
Aide
4 months ago
Right? So many steps to remember.
upvoted 0 times
...
Sherell
4 months ago
I included the apache role in the playbook and added tasks for pre and post checks.
upvoted 0 times
...
Georgiana
4 months ago
Make sure the playbook runs on hosts in the webservers host group.
upvoted 0 times
...
Armanda
4 months ago
Great, now you need to create the httpd.yml playbook.
upvoted 0 times
...
Sherell
4 months ago
Yes, the index.html file has the output 'Welcome to HOSTNAME on IPADDRESS'.
upvoted 0 times
...
Georgiana
4 months ago
Did you create the index.html file with the correct template?
upvoted 0 times
...
Sherell
4 months ago
I enabled and started the firewall with the rule.
upvoted 0 times
...
Armanda
4 months ago
Don't forget to add the firewall rule to allow access to the web server.
upvoted 0 times
...
Sherell
4 months ago
Yes, I also started the httpd service.
upvoted 0 times
...
Georgiana
4 months ago
Did you make sure the httpd package is installed and enabled on boot?
upvoted 0 times
...
Sherell
4 months ago
I just created the apache role in /home/admin/ansible/roles.
upvoted 0 times
...

Save Cancel