diff --git a/Home.md b/Home.md index 5d08b7b..76aa854 100644 --- a/Home.md +++ b/Home.md @@ -1 +1,4 @@ -Welcome to the Wiki. \ No newline at end of file +Welcome to the wiki for my homelab! As this homelab is rather important to me, +I'm trying to keep it very well organized an documented. While this wiki is +mostly meant to be read by me in the future, there's definitely some +interesting information in here for anyone with a similar setup. diff --git a/_Sidebar.md b/_Sidebar.md index 302c5e5..c2d1139 100644 --- a/_Sidebar.md +++ b/_Sidebar.md @@ -1 +1 @@ -- [Integrating a new Pi](/integrate-new-pi) +- [Integrating a new Pi](integrate-new-pi) diff --git a/integrate-new-pi.md b/integrate-new-pi.md index fec5601..3e31191 100644 --- a/integrate-new-pi.md +++ b/integrate-new-pi.md @@ -1 +1,30 @@ -# Hello +# Integrating a new Pi + +When integrating a new Pi, a few steps need to be performed before it can be +integrated with the rest of the Ansible config. + +First of all, an SD card should be formatted with [Debian Raspberry +Pi](https://raspi.debian.net/) as the operating system. Before booting for the +first time, change the following in `/boot/firmware/sysconf.txt` (you can do +this by simply having the SD card mounted on your computer): + +* Set `hostname` to the desired name +* Set `root_authorized_key` to the contents of the current computer's public + SSH key + +Now the SD card can be inserted into the Raspberry Pi. Connect the Pi to the +LAN using a wired connection and let it boot. After a little while, it should +show up on the local network with a DNS-assigned IP. You can discover what IP +it received in many ways; I usually just check the router's configuration +panel. Finally, decide what static IP the Pi should be assigned to from here on +out. + +Now you can run the initial configuration of the Pi with the following command: + +```sh +ansible-playbook -i [original ip], -e ansible_ssh_user=root -e static_ip=[static ip] first_run.yml +``` + +The [first_run.yml](src/branch/main/first_run.yml) playbook installs Python3 +and sets up the base user and SSH configuration so all other Ansible roles can +work properly.