feat: aggiunti file alla sezione 2_inventory
This commit is contained in:
parent
46cc807ad7
commit
975b71cf8e
6 changed files with 73 additions and 1 deletions
4
2_inventory/20_inventory-test.yaml
Normal file
4
2_inventory/20_inventory-test.yaml
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
---
|
||||||
|
all:
|
||||||
|
hosts:
|
||||||
|
host1test.mydomain.xyz:
|
||||||
5
2_inventory/21_inventory-test.yaml
Normal file
5
2_inventory/21_inventory-test.yaml
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
gruppo_test:
|
||||||
|
hosts:
|
||||||
|
host1test.mydomain.xyz:
|
||||||
|
host2test.mydomain.xyz:
|
||||||
7
2_inventory/22_inventory-test.yaml
Normal file
7
2_inventory/22_inventory-test.yaml
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
---
|
||||||
|
gruppo_test:
|
||||||
|
hosts:
|
||||||
|
host1test.mydomain.xyz:
|
||||||
|
ansible_host: 127.0.0.2
|
||||||
|
host2test.mydomain.xyz:
|
||||||
|
ansible_host: 127.0.0.3
|
||||||
9
2_inventory/23_inventory-test.yaml
Normal file
9
2_inventory/23_inventory-test.yaml
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
---
|
||||||
|
gruppo_test:
|
||||||
|
hosts:
|
||||||
|
host1test.mydomain.xyz:
|
||||||
|
ansible_host: 127.0.0.2
|
||||||
|
host2test.mydomain.xyz:
|
||||||
|
ansible_host: 127.0.0.3
|
||||||
|
vars:
|
||||||
|
ansible_user: nobody
|
||||||
23
2_inventory/24_inventory-test.yaml
Normal file
23
2_inventory/24_inventory-test.yaml
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
---
|
||||||
|
gruppo_test:
|
||||||
|
hosts:
|
||||||
|
host1test.mydomain.xyz:
|
||||||
|
ansible_host: 127.0.0.2
|
||||||
|
host2test.mydomain.xyz:
|
||||||
|
ansible_host: 127.0.0.3
|
||||||
|
vars:
|
||||||
|
ansible_user: nobody
|
||||||
|
|
||||||
|
gruppo_prod:
|
||||||
|
hosts:
|
||||||
|
host1prod.mydomain.xyz:
|
||||||
|
ansible_host: 127.0.0.4
|
||||||
|
host2prod.mydomain.xyz:
|
||||||
|
ansible_host: 127.0.0.5
|
||||||
|
vars:
|
||||||
|
ansible_user: root
|
||||||
|
|
||||||
|
gruppo_all:
|
||||||
|
children:
|
||||||
|
gruppo_test:
|
||||||
|
gruppo_prod:
|
||||||
|
|
@ -34,5 +34,29 @@ cat 14_inventory-test
|
||||||
2.0) Esempio file di inventory in formato yaml:
|
2.0) Esempio file di inventory in formato yaml:
|
||||||
- Nell'inventory è presente il solo host host1test.mydomain.xyz
|
- Nell'inventory è presente il solo host host1test.mydomain.xyz
|
||||||
```
|
```
|
||||||
cat 20_inventory-test
|
cat 20_inventory-test.yaml
|
||||||
|
```
|
||||||
|
|
||||||
|
2.1) Esempio file di inventory in formato yaml con gruppo:
|
||||||
|
- Nell'inventory è presente il gruppo gruppo_test composto da due hosts
|
||||||
|
```
|
||||||
|
cat 21_inventory-test.yaml
|
||||||
|
```
|
||||||
|
|
||||||
|
2.2) Esempio file di inventory in formato yaml con gruppo e variabili dei singoli hosts:
|
||||||
|
- Nell'inventory è presente il gruppo gruppo_test composto da due hosts con la variabile che definisce gli IP
|
||||||
|
```
|
||||||
|
cat 22_inventory-test.yaml
|
||||||
|
```
|
||||||
|
|
||||||
|
2.3) Esempio file di inventory in formato yaml con gruppo e variabili per il gruppo:
|
||||||
|
- Nell'inventory è presente il gruppo gruppo_test composto da due hosts con la variabile che definisce gli IP e la variabile ansible_user valida per l'intero gruppo
|
||||||
|
```
|
||||||
|
cat 23_inventory-test.yaml
|
||||||
|
```
|
||||||
|
|
||||||
|
2.4) Esempio file di inventory in formato yaml con gruppi, sottogruppi e variabili:
|
||||||
|
- Nell'inventory sono presenti due gruppi, gruppo_test e gruppo_prod. Inoltre è presente il gruppo gruppo_all che comprende i due sottogruppi gruppo_test e gruppo_prod
|
||||||
|
```
|
||||||
|
cat 24_inventory-test.yaml
|
||||||
```
|
```
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue