Lab2 Solution: Inventaire
Créer un groupe ha contenant le premier host
Section titled “Créer un groupe ha contenant le premier host”vi hosts[ha]host161Créer un groupe web contenant les hosts 2 et 3
Section titled “Créer un groupe web contenant les hosts 2 et 3”vi hosts[web]host162host163Créer une variable config pour le host 1 égale à ha.cf
Section titled “Créer une variable config pour le host 1 égale à ha.cf”vi hostshost161 config=haproxy.cfgCréer une variable index pour le groupe web égale à index.html
Section titled “Créer une variable index pour le groupe web égale à index.html”vi hosts[web:vars]index=index.htmlFichier complet
Section titled “Fichier complet”vi hosts[ha]host161 config=haproxy.cfg[web]host162host163[web:vars]index=index.htmlCréer un default inventory
Section titled “Créer un default inventory”vi ~/.ansible.cfg[defaults]inventory = /home/sadmin/inventory