Add example playbook entry
This commit is contained in:
parent
0cb6927831
commit
61bac7d661
27
README.md
27
README.md
@ -1,8 +1,5 @@
|
|||||||
Sets up backups to Cloudflare R2
|
Sets up backups to Cloudflare R2
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Instalation
|
# Instalation
|
||||||
|
|
||||||
In requirements.yml:
|
In requirements.yml:
|
||||||
@ -14,8 +11,28 @@ roles:
|
|||||||
name: setup-backups
|
name: setup-backups
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Setup
|
# Setup
|
||||||
|
|
||||||
Create a Cloudflare R2 account and create an admin token.
|
Create a Cloudflare R2 account and create an admin token.
|
||||||
|
|
||||||
|
Create a file under `templates/backup-scripts/<hostname>.sh.j2` that
|
||||||
|
is a shell script that prepares the data for backup - leave empty if
|
||||||
|
not necessary.
|
||||||
|
|
||||||
|
Then in your playbook run:
|
||||||
|
|
||||||
|
```yml
|
||||||
|
|
||||||
|
- name: "Setup backups"
|
||||||
|
hosts: ansible1
|
||||||
|
roles:
|
||||||
|
- setup-backups
|
||||||
|
vars:
|
||||||
|
backup_bucket_prefix: "backup"
|
||||||
|
all_backup_paths:
|
||||||
|
- /var/homebox/data
|
||||||
|
cloudflare_r2_access_key: "cloudflare R2 Access key (for S3-type API)"
|
||||||
|
cloudflare_r2_secret_key: "cloudflare R2 secret key (for S3-type API)"
|
||||||
|
cloudflare_r2_endpoint: https://some_endpoint.r2.cloudflarestorage.com
|
||||||
|
BACKUP_PASSWORD: password
|
||||||
|
```
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user