Feat: config for first deployment of backup

This commit is contained in:
Bertrand Benjamin 2022-03-13 14:39:34 +01:00
parent 2ffabd234a
commit 34f2494e6f
4 changed files with 47 additions and 0 deletions

16
home.yml Normal file
View File

@ -0,0 +1,16 @@
---
- name: backup
hosts: backup
vars_files:
- vars/backup.yml
- vars/backup_secret.yml
tasks:
- name: NFS shares client
include_role:
name: nfs_client
- name: Set up borgmatic
include_role:
name: borgmatic

2
inventories/home.ini Normal file
View File

@ -0,0 +1,2 @@
[backup]
ChouxBackupVM

21
vars/backup.yml Normal file
View File

@ -0,0 +1,21 @@
---
nfs_shares:
- mount_point: /mnt/Benjamin
server: nas.lan
export: /mnt/DocNas/Benjamin
options: "defaults,_netdev,rsize=8192,wsize=8192"
- mount_point: /mnt/Margot
server: nas.lan
export: /mnt/DocNas/Margot
options: "defaults,_netdev,rsize=8192,wsize=8192"
- mount_point: /mnt/Commun
server: nas.lan
export: /mnt/DocNas/Commun
options: defaults,_netdev,rsize=8192,wsize=8192
borg_source_directories: "{{ nfs_shares | map(attribute='mount_point') }}"
borg_repository: /backup/borgmatic

8
vars/backup_secret.yml Normal file
View File

@ -0,0 +1,8 @@
$ANSIBLE_VAULT;1.1;AES256
65636636393063666662376230316363666163336137353337613263316262396264623536363466
6531663935326330653465633663663161393538303661310a626635303731323732303966373836
31316233653365396335343034386232326661626537616439663433396439633538393138366334
6261633730636132340a376364363466336638646463323436633938633536376633636265666635
31666436306230643461626565353761316631376664366135316231616137646631343534653038
65646632303234333164373738666361316439386139346430343035323530666662356435313331
656364386339323039653433633962353166