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 # vps
This repository contains all the files I use to manage services hosted on [viyurz.fr](https://viyurz.fr). This repository contains all the files I use to manage services hosted on [viyurz.fr](https://viyurz.fr).
## Requirements ## Requirements
### Ansible ### Ansible
Install Ansible: Install Ansible:
``` ```
sudo apt install -y ansible sudo apt install -y ansible
``` ```
### SSL certificates ### SSL certificates
Install Certbot: Install Certbot:
``` ```
sudo apt install -y certbot python3-certbot-dns-ovh python3-certbot-nginx sudo apt install -y certbot python3-certbot-dns-ovh python3-certbot-nginx
``` ```
Request certificates: Request certificates:
``` ```
# For the NGINX reverse proxy # For the NGINX reverse proxy
sudo certbot certonly --nginx -d viyurz.fr,*.viyurz.fr sudo certbot certonly --nginx -d viyurz.fr,*.viyurz.fr
@ -31,6 +37,7 @@ sudo certbot certonly --nginx -d mail.viyurz.fr
### Storagebox ### Storagebox
Add credential: Add credential:
``` ```
/etc/storagebox-cifs-credentials.txt /etc/storagebox-cifs-credentials.txt
--- ---
@ -40,14 +47,14 @@ password=MYPASSWORD
Copy & edit file `fstab`. Copy & edit file `fstab`.
## Secrets ## 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`. If you want to change the vault password run `ansible-vault rekey secrets.yml`.
## Backups ## Backups
Run the `backup-services.yml` playbook once to setup the passphrase file. 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: After that, you can create a root cronjob to run this playbook without requiring interactivity: