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
-------------------------------------------------------------------
Louis
7 months agoValentin
7 months agoJamika
7 months agoPolly
7 months agoXochitl
8 months agoDan
8 months agoRebecka
8 months agoNada
8 months agoOrville
9 months agoBeckie
9 months agoWillie
9 months agoCory
9 months agoElza
9 months agoJeannine
1 year agoMarya
1 year agoBilly
1 year agoLucia
1 year agoFabiola
1 year agoMalinda
1 year agoEleonore
1 year agoNada
1 year agoTegan
1 year agoBette
1 year agoLaurel
1 year agoAmie
1 year agoWynell
1 year agoGaston
1 year agoDwight
1 year agoBelen
1 year agoIzetta
1 year agoLavina
1 year agoMalcolm
1 year agoCarmen
1 year agoTien
1 year agoLashon
1 year agoKate
1 year agoLashon
1 year ago