This repository contains a collection with a fact gathering module and a series of roles for working with both fresh installs of Rapsberry Pi OS and existing hosts on the network.
- Create an SD card use the Raspberry Pi Imager from Raspberry Pi OS to load a new OS on to your SD card.
- Make sure to set the settings for:
- a new user & password
- a new SSH key
- the desired hostname
- Install your SD card on your device and turn it on.
- Make sure your chosen hostname is listed in the
inventory.yml
file
There are official Ansible steps to install the Ansible CLI on your local machine (or any other machine) you will be using as a controller node.
- Make sure dependencies are installed:
ansible-galaxy install -r requirements.yml
- Run the entire playbook:
ansible-playbook playbook.yml
- Alternatively, you can use tags:
# run just the software tasks
ansible-playbook -t software playbook.yml
# run everything except the initial rpi provisioning
ansible-playbook --skip-tags init playbook.yml