This Ansible project is designed to automate the setup and management of my homelab composed of a Debian server.
The project includes roles to configure storage, automated backup solutions, Docker, and more, ensuring efficient and reliable operation of the homelab.
-
samba: Configures an SMB server for network file sharing.
-
bagsplus_backup: Configures a cron job to back up the store databases multiple times a day.
-
docker: Installs Docker and its dependencies.
-
deploy_containers: Deploys containers within the Docker instance.
-
setup_backups: Creates a daily backup script for Docker container storage and main file storage.
-
Nodes must run Debian OS (other OS are untested!).
-
Ensure SSH access is configured for Ansible to communicate with the nodes.
-
Python and Ansible installed on the control machine.
git clone https://github.com/raulrohjans/homelab-ansible.git
cd ansible-homelab
Modify the hosts inventory file to include your node details.
[mainservers]
192.168.1.5 ansible_host=192.168.1.5
[all:vars]
ansible_user=raul
Adjust any necessary variables in the "group_vars" folder to match your environment.
All the files that contain sensitive information are encrypted with ansible-vault. If you happen to know the password, you can use these commands to decrypt them
ansible-vault encrypt example.yml
ansible-vault decrypt example.yml
ansible-playbook main.yml --ask-pass --ask-become-pass --ask-vault-pass
Contributions are welcome! Please submit a pull request with detailed information about your changes!
This project is licensed under the MIT License. See the LICENSE file for more information.