diff --git a/ansible/configure-server.yml b/ansible/configure-server.yml index ab51314..e955800 100644 --- a/ansible/configure-server.yml +++ b/ansible/configure-server.yml @@ -11,11 +11,14 @@ - name: Copy systemd mount file ansible.builtin.copy: - src: files/systemd-mount.mount - dest: /etc/systemd/system/mnt-syno-InfraBackups.mount + src: files/{{item}}.mount + dest: /etc/systemd/system/{{item}}.mount owner: root group: root mode: 0644 + with_items: + - mnt-syno-InfraBackups + - mnt-syno-k8home register: systemd_mount - name: Reload systemd @@ -25,9 +28,12 @@ - name: Start & Enable systemd mount ansible.builtin.systemd: - name: mnt-syno-InfraBackups.mount + name: "{{item}}.mount" state: started enabled: yes + with_items: + - mnt-syno-InfraBackups + - mnt-syno-k8home when: systemd_mount.changed diff --git a/ansible/files/kdrive.mount b/ansible/files/kdrive.mount index 89ce74c..b061f51 100644 --- a/ansible/files/kdrive.mount +++ b/ansible/files/kdrive.mount @@ -6,7 +6,7 @@ Wants=network-online.target [Mount] What=https://371969.connect.kdrive.infomaniak.com Where=/mnt/kdrive -Options=noauto,user, +Options=noauto,user,ro, Type=davfs TimeoutSec=60 diff --git a/ansible/files/mnt-syno-InfraBackups.mount b/ansible/files/mnt-syno-InfraBackups.mount new file mode 100644 index 0000000..2371433 --- /dev/null +++ b/ansible/files/mnt-syno-InfraBackups.mount @@ -0,0 +1,13 @@ +[Unit] +Description=Mounts InfraBackup from syno +After=network.target +Wants=network.target + +[Mount] +What=192.168.10.200:/volume1/InfraBackups +Where=/mnt/syno/InfraBackups +Type=nfs +Options=defaults + +[Install] +WantedBy=multi-user.target diff --git a/ansible/files/mnt-syno-k8home.mount b/ansible/files/mnt-syno-k8home.mount new file mode 100644 index 0000000..8476906 --- /dev/null +++ b/ansible/files/mnt-syno-k8home.mount @@ -0,0 +1,13 @@ +[Unit] +Description=Mounts InfraBackup from syno +After=network.target +Wants=network.target + +[Mount] +What=192.168.10.200:/volume1/k8home +Where=/mnt/syno/k8home +Type=nfs +Options=defaults,ro + +[Install] +WantedBy=multi-user.target diff --git a/ansible/files/rsnapshot.conf.j2 b/ansible/files/rsnapshot.conf.j2 index 977d3f2..db41ff6 100644 --- a/ansible/files/rsnapshot.conf.j2 +++ b/ansible/files/rsnapshot.conf.j2 @@ -233,6 +233,10 @@ backup root@{{host}}:{{ backup_dir }} {{host}} ### kDrive backup /mnt/kdrive/ kdrive/ + +### kubernetes PVCs +backup /mnt/syno/k8home/ k8home/ + # LOCALHOST #backup /home/ localhost/ #backup /etc/ localhost/