style(metal): convert inventories from YAML to INI

We don't need to parse the inventories in Terraform anymore.
INI is easier to read and edit
This commit is contained in:
Khue Doan 2021-11-25 18:48:31 +07:00
parent 3d73d9efd9
commit 5b258eba7a
5 changed files with 23 additions and 19 deletions

View File

@ -4,17 +4,17 @@ default: boot cluster
boot:
ansible-playbook \
--inventory inventories/prod.yml \
--inventory inventories/prod.ini \
main.yml
cluster:
ansible-playbook \
--inventory inventories/prod.yml \
--inventory inventories/prod.ini \
cluster.yml
shutdown:
ansible-playbook \
--inventory inventories/prod.yml \
--inventory inventories/prod.ini \
shutdown.yml
lint:
@ -23,5 +23,5 @@ lint:
dev:
vagrant up
ansible-playbook \
--inventory inventories/dev.yml \
--inventory inventories/dev.ini \
cluster.yml

View File

@ -0,0 +1,8 @@
[metal:children]
masters
workers
[masters]
dev0 ansible_host=192.168.56.101
[workers]

View File

@ -1,5 +0,0 @@
metal:
children:
masters:
hosts:
dev0: {ansible_host: 192.168.56.101}

View File

@ -0,0 +1,11 @@
[metal:children]
masters
workers
[masters]
metal0 ansible_host=192.168.1.110 mac='00:23:24:d1:f3:f0'
metal1 ansible_host=192.168.1.111 mac='00:23:24:d1:f4:d6'
metal2 ansible_host=192.168.1.112 mac='00:23:24:e7:04:60'
[workers]
metal3 ansible_host=192.168.1.113 mac='00:23:24:d1:f5:69'

View File

@ -1,10 +0,0 @@
metal:
children:
masters:
hosts:
metal0: {ansible_host: 192.168.1.110, mac: '00:23:24:d1:f3:f0'}
metal1: {ansible_host: 192.168.1.111, mac: '00:23:24:d1:f4:d6'}
metal2: {ansible_host: 192.168.1.112, mac: '00:23:24:e7:04:60'}
workers:
hosts:
metal3: {ansible_host: 192.168.1.113, mac: '00:23:24:d1:f5:69'}