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
-------------------------------------------------------------------
Jeannine
2 months agoMarya
3 days agoBilly
6 days agoLucia
17 days agoFabiola
2 months agoMalinda
1 months agoEleonore
1 months agoNada
1 months agoTegan
2 months agoBette
12 days agoLaurel
16 days agoAmie
1 months agoWynell
1 months agoGaston
2 months agoDwight
1 months agoBelen
1 months agoIzetta
2 months agoLavina
1 months agoMalcolm
1 months agoCarmen
2 months agoTien
2 months agoLashon
2 months agoKate
3 months agoLashon
3 months ago