New Year Sale 2026! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

RedHat EX294 Exam - 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:

0/2000 characters
Corazon
3 months ago
I’m not sure about using `latest` for packages, could cause issues.
upvoted 0 times
...
Reta
3 months ago
Nice template setup! Simple and effective.
upvoted 0 times
...
Detra
3 months ago
Wait, is firewalld the default on all systems?
upvoted 0 times
...
Mirta
4 months ago
Totally agree, firewall is crucial for security.
upvoted 0 times
...
Dierdre
4 months ago
Looks good, but don't forget to check the firewall rules!
upvoted 0 times
...
Remona
4 months ago
I hope I remember to use the correct variables in the `index.html.j2` file; I think it was something like `{{ ansible_facts.fqdn }}` for the hostname.
upvoted 0 times
...
Judy
4 months ago
I feel confident about the playbook structure, but I might mix up the tasks for starting services and enabling them on boot.
upvoted 0 times
...
Karol
4 months ago
I think we did a similar question where we had to set up a web server, but I can't recall if we used the `firewalld` module or something else.
upvoted 0 times
...
Leana
5 months ago
I remember we practiced creating roles, but I'm a bit unsure about the exact syntax for the template file.
upvoted 0 times
...
Jerry
5 months ago
I think I've got a good handle on this. The key will be to take it step-by-step, test each piece as I go, and make sure the playbook runs without any syntax errors. Can't wait to see the final result!
upvoted 0 times
...
Reyes
5 months ago
This looks like a good opportunity to practice using Ansible's import_tasks functionality to keep my main.yml file clean and modular. I'll make sure to create separate task files for each logical component.
upvoted 0 times
...
Sabra
5 months ago
Ah, the template file for the index.html is a nice touch. I'll need to make sure I get the variable substitution right for the hostname and IP address. Shouldn't be too difficult, but I'll double-check the Jinja2 syntax.
upvoted 0 times
...
Eun
5 months ago
This looks like a pretty straightforward task. I think I can handle this by creating the role structure, defining the variables, and then building out the tasks to install the packages, configure the services, and generate the index.html file.
upvoted 0 times
...
Florinda
5 months ago
Hmm, I'm a bit unsure about the firewall configuration. Do I need to create a separate task for that or can I just include it in the service tasks? I'll need to review the firewall module documentation to make sure I'm doing that correctly.
upvoted 0 times
...
Ricki
5 months ago
I'm pretty confident that the correct answer is D. Motivation seems like the key factor that would affect an individual's trainability.
upvoted 0 times
...
Isaac
5 months ago
This seems straightforward. I think the key is to ensure Reply Mail Management is enabled and then configure the unsubscribe settings.
upvoted 0 times
...
Leslee
5 months ago
Group-level stickiness seems relevant, but I could be mixing it up with configuration options from another practice question.
upvoted 0 times
...
Huey
2 years ago
Definitely, running syntax check and testing the URL is crucial.
upvoted 0 times
...
Evan
2 years ago
Good point! It's easy to overlook.
upvoted 0 times
...
Laila
2 years ago
Makes creating the structure easier.
upvoted 0 times
...
Evelynn
2 years ago
True, firewalld can be tricky.
upvoted 0 times
...
Holley
2 years ago
Yeah, but don't forget creating the template file!
upvoted 0 times
...
Aide
2 years ago
Right? So many steps to remember.
upvoted 0 times
...
Sherell
2 years ago
I included the apache role in the playbook and added tasks for pre and post checks.
upvoted 0 times
...
Georgiana
2 years ago
Make sure the playbook runs on hosts in the webservers host group.
upvoted 0 times
...
Armanda
2 years ago
Great, now you need to create the httpd.yml playbook.
upvoted 0 times
...
Sherell
2 years ago
Yes, the index.html file has the output 'Welcome to HOSTNAME on IPADDRESS'.
upvoted 0 times
...
Georgiana
2 years ago
Did you create the index.html file with the correct template?
upvoted 0 times
...
Sherell
2 years ago
I enabled and started the firewall with the rule.
upvoted 0 times
...
Armanda
2 years ago
Don't forget to add the firewall rule to allow access to the web server.
upvoted 0 times
...
Sherell
2 years ago
Yes, I also started the httpd service.
upvoted 0 times
...
Georgiana
2 years ago
Did you make sure the httpd package is installed and enabled on boot?
upvoted 0 times
...
Sherell
2 years ago
I just created the apache role in /home/admin/ansible/roles.
upvoted 0 times
...

Save Cancel