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 14 Question 14 Discussion

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

Generate a hosts file:

hosts.j2 to

/home/admin/ansible/ Complete the template so that it can be used to generate a file

with a

line for each inventory host in the same format as /etc/hosts:

172.25.250.9 workstation.lab.example.com workstation

* Create a playbook called gen_hosts.yml that uses this template to generate the file

/etc/myhosts on hosts in the dev host group.

* When completed, the file /etc/myhosts on hosts in the dev host group should have a

line for

each managed host:

127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4

::1 localhost localhost.localdomain localhost6 localhost6.localdomain6

172.25.250.10 serevra.lab.example.com servera

172.25.250.11 serevrb.lab.example.com serverb

172.25.250.12 serevrc.lab.example.com serverc

172.25.250.13 serevrd.lab.example.com serverd

-----------------------------------------------------------------

while practising you to create these file hear. But in exam have to download as per

questation.

hosts.j2 file consists.

localhost localhost.localdomain localhost4 localhost4.localdomain4

::1

localhost localhost.localdomain localhost6 localhost6.localdomain6

-------------------------------------------------------------------

Show Suggested Answer Hide Answer
Suggested Answer: A

Contribute your Thoughts:

0/2000 characters
Beatriz
4 months ago
This is exactly how I did it last time, works like a charm!
upvoted 0 times
...
Dong
4 months ago
I think you might need to tweak the playbook a bit.
upvoted 0 times
...
Rodolfo
4 months ago
Wait, does this really work for all hosts?
upvoted 0 times
...
Tanesha
4 months ago
Totally agree, it's all about the syntax!
upvoted 0 times
...
Dorian
4 months ago
Just need to set up the template correctly!
upvoted 0 times
...
James
5 months ago
I recall the structure of the hosts file we need to create, but I’m not sure if I included all the necessary variables in the template.
upvoted 0 times
...
Ben
5 months ago
I’m a bit confused about the `when` condition in the playbook. Does it filter the hosts correctly for the dev group?
upvoted 0 times
...
Donte
5 months ago
I think we did a similar question where we had to generate a config file using Ansible. It was about using the `template` module, right?
upvoted 0 times
...
Nieves
5 months ago
I remember we practiced creating Jinja2 templates, but I'm not entirely sure about the exact syntax for the loop.
upvoted 0 times
...
Latosha
5 months ago
Okay, I think I've got this. I'll need to update the share capital and share premium accounts based on the new share issue details. Then I can recalculate the other equity balances.
upvoted 0 times
...
Sherrell
5 months ago
Hmm, I'm not too familiar with the file structure of an RSA NetWitness appliance. I'll have to think this through carefully.
upvoted 0 times
...

Save Cancel