Ansible management for my Raspberry Pis.
This project automates the setup and configuration of Raspberry Pi infrastructure using Ansible. It installs Docker, Portainer, and other necessary components to manage and maintain Raspberry Pi clusters efficiently.
- Ansible installed on the control machine.
- Raspberry Pis accessible via SSH.
- Basic knowledge of Ansible and Raspberry Pi administration.
playbook.yaml
: Main Ansible playbook containing tasks for Raspberry Pi setup.hosts.ini
: Inventory file listing Raspberry Pi hosts.roles/
: Directory for organizing Ansible roles.common/
: Role for common configurations across all Raspberry Pis.tasks/
: Directory containing tasks specific to thecommon
role.main.yaml
: Main tasks file for thecommon
role.
defaults/
: Directory containing default variables for thecommon
role.main.yaml
: Default variables file for thecommon
role.
requirements.txt
: File listing Ansible collections or roles required by the project.
-
Clone this repository to your local machine.
-
Modify the
hosts.ini
file to include the IP addresses of your Raspberry Pis. -
Execute the playbook using the following command:
ansible-playbook --inventory-file hosts.ini playbook.yml -u pi --ask-pass
-
Access Portainer by navigating to http://pi01-srv:9000 in your web browser.