diff --git a/home.yml b/home.yml new file mode 100644 index 0000000..ebca3cc --- /dev/null +++ b/home.yml @@ -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 + diff --git a/inventories/home.ini b/inventories/home.ini new file mode 100644 index 0000000..83fcc64 --- /dev/null +++ b/inventories/home.ini @@ -0,0 +1,2 @@ +[backup] +ChouxBackupVM diff --git a/vars/backup.yml b/vars/backup.yml new file mode 100644 index 0000000..fd58dfd --- /dev/null +++ b/vars/backup.yml @@ -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 + + + diff --git a/vars/backup_secret.yml b/vars/backup_secret.yml new file mode 100644 index 0000000..50377e8 --- /dev/null +++ b/vars/backup_secret.yml @@ -0,0 +1,8 @@ +$ANSIBLE_VAULT;1.1;AES256 +65636636393063666662376230316363666163336137353337613263316262396264623536363466 +6531663935326330653465633663663161393538303661310a626635303731323732303966373836 +31316233653365396335343034386232326661626537616439663433396439633538393138366334 +6261633730636132340a376364363466336638646463323436633938633536376633636265666635 +31666436306230643461626565353761316631376664366135316231616137646631343534653038 +65646632303234333164373738666361316439386139346430343035323530666662356435313331 +656364386339323039653433633962353166