2023-03-06 23:13:54 +00:00
|
|
|
# role_borgmatic
|
2023-03-06 21:49:53 +00:00
|
|
|
|
2023-03-06 23:13:54 +00:00
|
|
|
Rôle de déploiement de borgmatic.
|
|
|
|
|
|
|
|
## Variables
|
|
|
|
|
|
|
|
### borgmatic_distribution_release
|
|
|
|
|
|
|
|
Nom de la version de la distribution.
|
|
|
|
|
|
|
|
*<span style="text-decoration: underline">Valeur par défaut:</span> `bullseye`*
|
|
|
|
|
|
|
|
### borgmatic_keys
|
|
|
|
|
|
|
|
Dictionnaire comportant la clef privée (`private`) et la clef publique (`public`) du dépôt Borg.
|
|
|
|
|
|
|
|
*<span style="text-decoration: underline">Valeur par défaut:</span> aucune*
|
|
|
|
|
|
|
|
### borgmatic_checks
|
|
|
|
|
|
|
|
Liste des vérifications automatiques.
|
|
|
|
|
|
|
|
*<span style="text-decoration: underline">Valeur par défaut:</span> `[{frequency: 4 weeks, name: repository}, {frequency: 2 weeks, name: archives}]`*
|
|
|
|
|
|
|
|
### borgmatic_healthchecks
|
|
|
|
|
|
|
|
URL vers le serveur healtchecks.io.
|
|
|
|
|
|
|
|
*<span style="text-decoration: underline">Valeur par défaut:</span> aucune*
|
|
|
|
|
|
|
|
### borgmatic_exclude_patterns
|
|
|
|
|
|
|
|
Liste des éléments exclus de la sauvegarde.
|
|
|
|
|
|
|
|
*<span style="text-decoration: underline">Valeur par défaut:</span> aucune*
|
|
|
|
|
|
|
|
### borgmatic_repositories
|
|
|
|
|
2023-07-28 07:03:59 +00:00
|
|
|
Dictionnaire contenant le `label` et le `path` des dépôts vers lesquels envoyer la sauvegarde.
|
2023-03-06 23:13:54 +00:00
|
|
|
|
|
|
|
*<span style="text-decoration: underline">Valeur par défaut:</span> aucune*
|
|
|
|
|
|
|
|
### borgmatic_source_directories
|
|
|
|
|
|
|
|
Liste des dossiers à sauvegarder.
|
|
|
|
|
|
|
|
*<span style="text-decoration: underline">Valeur par défaut:</span> aucune*
|
|
|
|
|
|
|
|
### borgmatic_retention
|
|
|
|
|
|
|
|
Dictionnaire permettant de définir la rétention.
|
|
|
|
|
|
|
|
*<span style="text-decoration: underline">Valeur par défaut:</span> `{daily: 7, monthly: 0, weekly: 4}`*
|
|
|
|
|
|
|
|
### borgmatic_name
|
|
|
|
|
|
|
|
Nom de la sauvegarde.
|
|
|
|
|
|
|
|
*<span style="text-decoration: underline">Valeur par défaut:</span> `{{ inventory_hostname }}_{now}`*
|
|
|
|
|
|
|
|
### borgmatic_compression
|
|
|
|
|
|
|
|
Algorythme de compression de la sauvegarde.
|
|
|
|
|
|
|
|
*<span style="text-decoration: underline">Valeur par défaut:</span> `none`*
|
|
|
|
|
|
|
|
### borgmatic_passphrase
|
|
|
|
|
|
|
|
Phrase de passe de chiffrement de la sauvegarde.
|
|
|
|
|
|
|
|
*<span style="text-decoration: underline">Valeur par défaut:</span> aucune*
|
|
|
|
|
2023-10-05 07:39:35 +00:00
|
|
|
### borgmatic_restore_first
|
|
|
|
|
|
|
|
Booléen permettant de restaurer une sauvegarde au déploiement du rôle.
|
|
|
|
|
|
|
|
*<span style="text-decoration: underline">Valeur par défaut:</span> `false`*
|
|
|
|
|
2023-03-06 23:13:54 +00:00
|
|
|
## Exemples
|
|
|
|
|
|
|
|
### host_vars/host1.ykn.local
|
|
|
|
|
|
|
|
```yaml
|
|
|
|
---
|
|
|
|
|
|
|
|
borgmatic_keys:
|
|
|
|
private: !vault |
|
|
|
|
$ANSIBLE_VAULT;1.1;AES256
|
|
|
|
63383766386235373363643632346463656132363834653765656463663636663366396265353937
|
|
|
|
3732643765363735366437373435616433336134313266340a336638626163633864313363373330
|
|
|
|
38353632373232303838323438656334353964343539373465643939356536373432323363656434
|
|
|
|
3737656232623666300a363138623664366461346230666634633739646334373234626533623938
|
|
|
|
3031
|
|
|
|
public: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMdANRmMmEeyYMMDWJH6DxJsQUUP+Uudv7DgMXY5O+iQ root@{{ inventory_hostname }}
|
|
|
|
borgmatic_healthchecks: https:///healthchecks.ykn.local/ping/7f7332cc-a7d9-4a81-af86-651f856f34b7
|
|
|
|
borgmatic_repositories: ["ssh://e7892281@borgwarehouse.ykn.local:22/./repo2"]
|
|
|
|
borgmatic_source_directories: ["/srv/vaultwarden"]
|
|
|
|
borgmatic_exclude_patterns:
|
|
|
|
- '/srv/vaultwarden/icon_cache'
|
|
|
|
- '/srv/vaultwarden/tmp'
|
|
|
|
borgmatic_passphrase: !vault |
|
|
|
|
$ANSIBLE_VAULT;1.1;AES256
|
|
|
|
36623861393935613563336339333962353436353839653762346633363138616233343433356130
|
|
|
|
3133353763393231393236306637313437633366623835300a653161356132663864636634626637
|
|
|
|
63653162393964616339623734613865636535396364396238306664396636353366653439366532
|
|
|
|
3836666166663163630a643635616164366337626632386336323938366636646463373937616361
|
|
|
|
3139
|
|
|
|
borgmatic_compression: lz4
|
|
|
|
```
|
|
|
|
|
|
|
|
### playbook.yml
|
|
|
|
|
|
|
|
```yaml
|
|
|
|
---
|
|
|
|
|
|
|
|
- name: Déployer les rôles communs
|
|
|
|
hosts: 'all:!nixos'
|
|
|
|
roles:
|
|
|
|
- name: etc_hosts
|
|
|
|
- name: ifupdown
|
|
|
|
when: network_provider == "ifupdown"
|
|
|
|
- name: nftables
|
|
|
|
- name: ssh
|
|
|
|
- name: fail2ban
|
|
|
|
- name: users
|
|
|
|
- name: healthchecks_io
|
|
|
|
- name: borgmatic
|
|
|
|
```
|