switch to inventory in yaml

This commit is contained in:
pgrondek 2020-04-11 00:15:37 +02:00
parent e9ad10429e
commit f67bca31a4
4 changed files with 17 additions and 17 deletions

View File

@ -1,5 +1,5 @@
[defaults] [defaults]
inventory = ./hosts inventory = ./inventory
[privilege_escalation] [privilege_escalation]
become_ask_pass=True become_ask_pass=True

10
hosts
View File

@ -1,10 +0,0 @@
[prusa]
prusa.lan ansible_user=ubuntu
[iron_man]
iron-man.lan
[docker_swarm]
node-01.lan docker_node=node-01
node-02.lan docker_node=node-02
node-03.lan docker_node=node-03

View File

@ -1,6 +0,0 @@
---
all:
hosts:
prusa:
ansible_host: prusa.lan
ansible_user: ubuntu

16
inventory/hosts.yml Normal file
View File

@ -0,0 +1,16 @@
---
all:
hosts:
prusa.lan:
vars:
ansible_user: ubuntu
iron-man.lan:
children:
docker_swarm:
hosts:
node-01.lan:
docker_node: node-01
node-02.lan:
docker_node: node-02
node-03.lan:
docker_node: node-03