Ansible project to manage my services. https://viyurz.fr
Find a file
Viyurz 6a4dd7cd2b
Etebase: Add etebase-server.ini template.
Some environment variables set in docker compose file (TIME_ZONE,
ALLOWED_HOSTS) are used only if
the etebase-server.ini file doesn't exist, which can be misleading.

If we change these variables after the etebase-server.ini file has been
generated, the settings won't be updated in the config file.

Templating this file allows changing these settings after the first run.
2024-02-23 12:41:39 +01:00
playbooks Add borg backup playbook/roles/tasks + Implement for Vaultwarden. 2024-02-22 19:09:43 +01:00
roles Etebase: Add etebase-server.ini template. 2024-02-23 12:41:39 +01:00
.gitignore The Great Ansible Update. 2024-02-17 19:01:04 +01:00
ansible-playbook-selector.sh The Great Ansible Update. 2024-02-17 19:01:04 +01:00
ansible.cfg The Great Ansible Update. 2024-02-17 19:01:04 +01:00
backup.sh Backup script: change _ for - in container name. 2024-02-15 11:29:31 +01:00
env.yml Add Synapse backup tasks. 2024-02-23 12:17:32 +01:00
README.md README: Add full crontab entry. 2024-02-23 09:46:48 +01:00
secrets.yml.example Add Synapse backup tasks. 2024-02-23 12:17:32 +01:00

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.