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