Add page explaining how to integrate new pi
parent
098c2e6fe5
commit
9a66ea8f6e
5
Home.md
5
Home.md
|
@ -1 +1,4 @@
|
|||
Welcome to the Wiki.
|
||||
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.
|
||||
|
|
|
@ -1 +1 @@
|
|||
- [Integrating a new Pi](/integrate-new-pi)
|
||||
- [Integrating a new Pi](integrate-new-pi)
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue