Project to manage my services.
https://viyurz.fr
Viyurz
d7190fcf6e
Roles which require backup (etebase, synapse & vaultwarden) have their tasks splitted into two files (backup.yml & update.yml), which are executed based on the value of run_backup & run_update variables. For consistency, move the update tasks to update.yml for every role, even if they do not have any backup task. |
||
---|---|---|
playbooks | ||
roles | ||
.gitignore | ||
ansible-playbook-selector.sh | ||
ansible.cfg | ||
env.yml | ||
README.md | ||
secrets.yml.example |
vps
This repository contains all the files I use to manage services hosted on viyurz.fr.
Requirements
Ansible:
sudo apt install -y ansible
Setup SSL certificates with Certbot beforehand:
sudo apt install -y certbot python3-certbot-dns-ovh
Secrets
Copy the existing secrets.yml.example
to secrets.yml
, run ansible-vault encrypt secrets.yml
to encrypt the file with a password, and finally edit the newly encrypted file with ansible-vault edit secrets.yml
.
If you want to change the vault password run ansible-vault rekey secrets.yml
.
Backups
Run the backup-services.yml
playbook once to setup the passphrase file.
After that, you can create a root cronjob to run this playbook without requiring interactivity:
0 4 * * * export ANSIBLE_ROLES_PATH=/home/viyurz/vps/roles/; /usr/bin/ansible-playbook /home/viyurz/vps/playbooks/backup-services.yml -e include_secrets=false -e selected_projects=''
Here we leave selected_projects
empty to backup all projects.