mirror of
https://github.com/khuedoan/homelab.git
synced 2025-01-05 13:08:52 +07:00
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:
parent
3d73d9efd9
commit
5b258eba7a
@ -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
|
||||
|
8
metal/inventories/dev.ini
Normal file
8
metal/inventories/dev.ini
Normal file
@ -0,0 +1,8 @@
|
||||
[metal:children]
|
||||
masters
|
||||
workers
|
||||
|
||||
[masters]
|
||||
dev0 ansible_host=192.168.56.101
|
||||
|
||||
[workers]
|
@ -1,5 +0,0 @@
|
||||
metal:
|
||||
children:
|
||||
masters:
|
||||
hosts:
|
||||
dev0: {ansible_host: 192.168.56.101}
|
11
metal/inventories/prod.ini
Normal file
11
metal/inventories/prod.ini
Normal 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'
|
@ -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'}
|
Loading…
Reference in New Issue
Block a user