ansible/playbooks/borgbackup.yml
Alexandre Iooss fa237cdea3
Some checks failed
continuous-integration/drone/push Build is failing
borgbackups: move variables in playbook
2021-11-28 17:27:41 +01:00

92 lines
2.3 KiB
YAML
Executable file

#!/usr/bin/env ansible-playbook
---
- hosts: perceval.adm.auro.re
vars:
borg_server_backups_dir: /borg
update_motd:
borgbackup_server: >-
Les sauvegardes (borg) sont stockées dans
{{ borg_server_backups_dir }}.
roles:
- borgbackup_server
- 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
...