This Ansible playbook is designed to rapidly set up your Raspberry Pi.
It's compatible with all models. It has been successfully tested on multiple models, including the Pi Zero W, Pi Zero 2W, and Pi 4B, among others. The playbook should work well on both Debian and Debian-based distributions.
You can choose what you want to install with tags :
- standard, std : install standard packages, configure .bashrc, .vimrc
- display : configure my display with LCD-show
- docker : install Docker
- jackit : install jackit for exploit code for Mousejack
multitor : install a proxy with multiple TOR instances with load-balancing (trimstray/multitor) → Known issues- tor : install Tor → README
- rfid : install RFID tools (libnfc, mfoc, mfcuk) and keys from MifareClassicTool → See Notes
- sdr : install SDR tools (rtl_433)
- web : install nginx and certbot
- wifi : install Wifi and GPS tools for wardriving
You will need to modify this file to configure the correct display.
Containers :
- jd2 docker container for JDownloader 2 jlesage/jdownloader-2 → See Configuration tips'
- portainer Portainer CE - a lightweight service delivery platform for containerized applications portainer/portainer-ce
- proxy Rotating Tor HTTP proxy container
List of all tasks :
containers : Create volume portainer_data TAGS: [containers, portainer]
containers : Create container portainer-ce TAGS: [containers, portainer]
containers : Container jlesage/jdownloader-2 TAGS: [containers, jd2]
containers : Create rotating Tor HTTP proxy container TAGS: [containers, proxy]
containers : Get list of containers TAGS: [containers]
containers : Show state of Docker containers TAGS: [containers]
docker : Verify if docker is installed TAGS: [docker]
docker : Uninstall all conflicting packages with Docker TAGS: [docker]
docker : Install Docker packages TAGS: [docker]
docker : Download docker install script TAGS: [docker]
docker : Run docker install script TAGS: [docker]
docker : Verify docker installation TAGS: [docker]
docker : Docker version TAGS: [docker]
docker : Remove docker install script TAGS: [docker]
tor : Packages installation TAGS: [tor]
tor : Download script check_tor.py TAGS: [tor]
rfid : Packages installation TAGS: [rfid]
rfid : Download std.keys from MifareClassicTool TAGS: [rfid]
rfid : Download extended-std.keys from MifareClassicTool TAGS: [rfid]
rfid : Download mct2dmp from bm-mifare-classic TAGS: [rfid]
rfid : Download 4B_Converter from ClassicConverter TAGS: [rfid]
rfid : Download 7B_Converter from ClassicConverter TAGS: [rfid]
sdr : Packages installation TAGS: [sdr]
standard : System update/upgrade TAGS: [standard, std]
standard : Packages installation TAGS: [standard, std]
standard : Ensure ~/.vim/colors directory exists TAGS: [standard, std]
standard : Download Solarized colorscheme TAGS: [standard, std]
standard : Deploy .vimrc from template TAGS: [standard, std]
standard : Add managed aliases block to .bashrc TAGS: [standard, std]
standard : Ensure other custom lines exist in .bashrc TAGS: [standard, std]
web : Packages installation TAGS: [web]
web : Check if certbot already installed TAGS: [web]
web : Install certbot TAGS: [web]
web : Link certbot TAGS: [web]
wifi : Packages installation TAGS: [wifi]
To setup directly from the Pi, run the following command : Before run command you must setup your Pi with Raspberry Pi Imager.
Next run command :
curl -s https://raw.githubusercontent.com/atao/raspberrypi-setup/main/install.sh | bash -s -- all
To setup run the following command :
git clone https://github.com/atao/raspberrypi-setup.git
cd raspberrypi-setup
ansible-playbook playbook.yml -i hosts --tags all -K
List playbook tasks :
ansible-playbook playbook.yml -i hosts --list-tasks
Install only some tags :
curl -s https://raw.githubusercontent.com/atao/raspberrypi-setup/main/install.sh | bash -s -- standard,proxy,rfid,docker,web,jd2
Yaml lint
yamllint playbook.yml roles/
Check syntax :
--syntax-check
--
Inspired from geerlingguy / mac-dev-playbook and nico2che / mac-setup