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