Ansible baseline configuration for raspberrypi
This is a baseline configuration for Raspberry Pi. It will configure the basic stuff that is common to all my raspberry pi installations like ssh, ntp, etc. Check the list of features.
Features
- ntp
- locale set to en_US.UTF-8
- timezone set to UTC
- duckdns.org sample cronjob
- automatic-upgrades
- creates my username (ssh pubkey, zsh+zprezto)
- sudo
- ssh hardneded
- fail2ban
- installs common software
- removes unwanted packages
- disable_ipv6
- config.txt -- disable audio to avoid loading an extra kernel module (snd_bcm2835) -- gpu_mem=16
- enable tmpfs for /tmp
Installation
-
Install Raspbian on a 4Gb or bigger SD card. (There is a guide here http://www.raspberrypi.org/documentation/installation/installing-images/README.md)
-
Finish the installation. If you are going move the rootfs to an external usb hard drive do it now.
-
Turn on the pi, ssh into it and run the oneliner
$ ssh pi@raspberrypi
$ curl -sL https://raw.githubusercontent.com/facastagnini/ansible-raspberrypi-baseline/master/bootstrap.sh | sudo bash
How to develop
- pre-requisites
brew update
brew cask install virtualbox
brew cask install vagrant
# vagrant plugins
vagrant plugin install vagrant-cachier
- fork this repo and clone
- Bring up the test machine
cd ansible-raspberrypi-baseline
vagrant up
Contributing and Development
Bugs and PRs are welcome! I code and test with vagrant, then I test on a fresh raspberry pi.