initial commit
This commit is contained in:
22
Readme.md
Normal file
22
Readme.md
Normal file
@@ -0,0 +1,22 @@
|
||||
INVENTAIRE
|
||||
----------
|
||||
|
||||
*Tâche*: Mettre au point un fichier d'inventaire simple
|
||||
|
||||
*Condition*: pour utiliser ansible
|
||||
|
||||
*Norme*: vim, /etc/ansible/hosts
|
||||
|
||||
*Pratique:*
|
||||
|
||||
Créer un fichier d'inventaire contenant:
|
||||
|
||||
1. les machines cibles précédemment mises en place
|
||||
2. un groupe "centos" ne contenant que la machine virtuelle centos1.
|
||||
2. un groupe "debian" ne contenant que la machine virtuelle debian1.
|
||||
3. un groupe "cibles" contenant les machines des groupes debian et centos
|
||||
|
||||
*Performance*:
|
||||
```bash
|
||||
ansible-inventory -i inventaire --graph
|
||||
```
|
||||
1
group_vars/cibles.yml
Normal file
1
group_vars/cibles.yml
Normal file
@@ -0,0 +1 @@
|
||||
myvar: "variable de groupe"
|
||||
1
group_vars/machines
Normal file
1
group_vars/machines
Normal file
@@ -0,0 +1 @@
|
||||
var_machine: foo
|
||||
1
host_vars/amue-sib-centos-01.formation.actilis.fr.yml
Normal file
1
host_vars/amue-sib-centos-01.formation.actilis.fr.yml
Normal file
@@ -0,0 +1 @@
|
||||
myvar: "valeur specifique à amue-sib-centos-01.formation.actilis.fr"
|
||||
1
host_vars/m4
Normal file
1
host_vars/m4
Normal file
@@ -0,0 +1 @@
|
||||
foo: bar
|
||||
12
inventaire
Normal file
12
inventaire
Normal file
@@ -0,0 +1,12 @@
|
||||
# /etc/ansible/hosts
|
||||
[debian]
|
||||
amue-sib-debian-01.formation.actilis.fr
|
||||
|
||||
|
||||
[centos]
|
||||
amue-sib-centos-01.formation.actilis.fr
|
||||
|
||||
|
||||
[cibles:children]
|
||||
debian
|
||||
centos
|
||||
Reference in New Issue
Block a user