Configuration
Open the tools container, which includes all the tools needed:
make tools
nix-shell
Note
It will take a while to build the tools container on the first time
Run the following script to configure the homelab:
make configure
Example
Text editor (nvim):
Enter seed repo (github.com/brimdor/homelab): github.com/example/homelab
Enter your domain (eaglepass.io): example.com
It will prompt you to edit the inventory:
- IP address: the desired one, not the current one, since your servers have no operating system installed yet
- Disk: based on
/dev/$DISK
, in my case it'ssda
, but yours can besdb
,nvme0n1
... - Network interface: usually it's
eth0
, mine iseno1
- MAC address: the lowercase, colon separated MAC address of the above network interface
Example
metal/inventories/prod.yml
metal:
children:
masters:
hosts:
charmander:
{
ansible_host: 10.0.50.121,
mac: "00:23:24:b0:ff:03",
disk: sda,
network_interface: eno1,
}
squirtle:
{
ansible_host: 10.0.50.122,
mac: "00:23:24:e2:1f:a1",
disk: sda,
network_interface: eno1,
}
bulbasaur:
{
ansible_host: 10.0.50.123,
mac: "00:23:24:e2:0d:ea",
disk: sda,
network_interface: eno1,
}
workers:
hosts:
pikachu:
{
ansible_host: 10.0.50.124,
mac: "e0:4f:43:24:0b:53",
disk: sda,
network_interface: eno1,
}
At the end it will show what has changed. After examining the diff, commit and push the changes.