Skip to content

Latest commit

 

History

History
36 lines (27 loc) · 1.13 KB

README.md

File metadata and controls

36 lines (27 loc) · 1.13 KB

Ansible Pi Playbook

My Ansible Playbook I use each time I reflash my Raspberry Pi's. The playbook automates:

  • updating apt cache
  • upgrading apt packages
  • auto-removing obsolete apt packages
  • Install a list of packages
  • Create a user and add them as root

Prerequisites

Install ansible on the machine you plan to run this playbook on.

Since the ISO I use does not have python3 installed by default, make sure it's present.

This script is only built with Debian-based distro's in mind. Feel free to fork it if you want other package managers.

Usage

  1. Copy the example files to the same directory.
cp example.hosts.ini hosts.ini
cp example.vars.yml vars.yml
  1. Add hosts to host.ini
  2. Add or remove packages in vars.yml
  3. Add desired username to create.
  4. For the password: variable, run mkpasswd --method=sha-512 in a terminal and use the output from it.
  5. Run it with ansible-playbook -K playbook.yml

Roadmap

  • Automatically install Oh My ZSH.

  • Automatically add SSH keys

License

WTFPL