ansible/playbooks/borgbackup.yml

93 lines
2.3 KiB
YAML
Raw Permalink Normal View History

#!/usr/bin/env ansible-playbook
2021-03-11 20:09:26 +01:00
---
- hosts: perceval.adm.auro.re
2021-11-27 19:14:39 +01:00
vars:
borg_server_backups_dir: /borg
2021-11-27 19:14:39 +01:00
update_motd:
borgbackup_server: >-
Les sauvegardes (borg) sont stockées dans
{{ borg_server_backups_dir }}.
2021-03-11 20:09:26 +01:00
roles:
- borgbackup_server
2021-11-27 19:14:39 +01:00
- update_motd
- hosts: all,!unifi,!unifi-*,!bdd,!caradoc.adm.auro.re
vars:
borg_server_host: 10.128.0.4
borg_encryption_passphrase: "{{ vault_borg_encryption_passphrase }}"
borg_backup_directories:
- /etc
- /var
borg_backup_exclude:
- /var/log
- /var/lib/docker
- /var/lib/lxcfs
update_motd:
borgbackup_client: >-
BorgBackup est déployé (/etc/borgmatic/config.yaml)
roles:
#- borgbackup_client
- update_motd
# On NAS, also backup NAS data
- hosts: caradoc.adm.auro.re
vars:
borg_server_host: 10.128.0.4
borg_encryption_passphrase: "{{ vault_borg_encryption_passphrase }}"
borg_backup_directories:
- /etc
- /var
- /data_nextcloud
- /data_gitea
- /data_mail
borg_backup_exclude:
- /var/log
- /var/lib/docker
- /var/lib/lxcfs
borg_keep_hourly: 6
update_motd:
borgbackup_client: >-
BorgBackup est déployé (/etc/borgmatic/config.yaml)
roles:
#- borgbackup_client
- update_motd
# On databases server, also backup databases
- hosts: bdd
vars:
borg_server_host: 10.128.0.4
borg_encryption_passphrase: "{{ vault_borg_encryption_passphrase }}"
borg_backup_directories:
- /etc
- /var
borg_backup_exclude:
- /var/log
- /var/lib/docker
- /var/lib/lxcfs
borg_postgresql_databases: true
update_motd:
borgbackup_client: >-
BorgBackup est déployé (/etc/borgmatic/config.yaml)
roles:
#- borgbackup_client
- update_motd
# On log server, also backup logs
- hosts: log.adm.auro.re
vars:
borg_server_host: 10.128.0.4
borg_encryption_passphrase: "{{ vault_borg_encryption_passphrase }}"
borg_backup_directories:
- /etc
- /var
borg_backup_exclude:
- /var/lib/docker
- /var/lib/lxcfs
update_motd:
borgbackup_client: >-
BorgBackup est déployé (/etc/borgmatic/config.yaml)
roles:
#- borgbackup_client
- update_motd
2021-03-11 20:09:26 +01:00
...