Format README

This commit is contained in:
Viyurz 2024-10-07 15:09:54 +02:00
parent 8264dfeb38
commit ea05e38b37
Signed by: Viyurz
SSH key fingerprint: SHA256:IskOHTmhHSJIvAt04N6aaxd5SZCVWW1Guf9tEcxIMj8

View file

@ -1,21 +1,27 @@
# vps
This repository contains all the files I use to manage services hosted on [viyurz.fr](https://viyurz.fr).
## Requirements
### Ansible
Install Ansible:
```
sudo apt install -y ansible
```
### SSL certificates
Install Certbot:
```
sudo apt install -y certbot python3-certbot-dns-ovh python3-certbot-nginx
```
Request certificates:
```
# For the NGINX reverse proxy
sudo certbot certonly --nginx -d viyurz.fr,*.viyurz.fr
@ -31,6 +37,7 @@ sudo certbot certonly --nginx -d mail.viyurz.fr
### Storagebox
Add credential:
```
/etc/storagebox-cifs-credentials.txt
---
@ -40,14 +47,14 @@ password=MYPASSWORD
Copy & edit file `fstab`.
## 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`.
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: