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 3 Question 58 Discussion

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

Generate a hosts file:

* Download an initial template file hosts.j2 from http://classroom.example.com/

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:

Izetta
4 days ago
The solution looks good, but I'm not sure how the hosts.j2 template file is supposed to be downloaded from the classroom.example.com website. Is that part of the exam question?
upvoted 0 times
...
Lashon
8 days ago
I agree, we have to make sure the file /etc/myhosts has a line for each managed host.
upvoted 0 times
...
Kate
8 days ago
Yes, we need to complete the template to generate a hosts file for the dev host group.
upvoted 0 times
...
Lashon
9 days ago
I think this question is tricky, we have to download a specific template file.
upvoted 0 times
...

Save Cancel