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
5 months agoValentin
5 months agoJamika
6 months agoPolly
6 months agoXochitl
6 months agoDan
6 months agoRebecka
7 months agoNada
7 months agoOrville
7 months agoBeckie
7 months agoWillie
7 months agoCory
8 months agoElza
8 months agoJeannine
1 year agoMarya
11 months agoBilly
11 months agoLucia
12 months agoFabiola
1 year agoMalinda
1 year agoEleonore
1 year agoNada
1 year agoTegan
1 year agoBette
12 months agoLaurel
12 months 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