summaryrefslogtreecommitdiff
path: root/roles/storage/zfs/syncoid/tasks
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2023-01-21 23:03:00 +0100
committerChristian Pointner <equinox@spreadspace.org>2023-01-21 23:03:00 +0100
commitfacdd63fe173b51c6d9de29ccc2167b0d7a45b6f (patch)
tree669c79d308749774da206c85acf8883568f0e8d5 /roles/storage/zfs/syncoid/tasks
parentadd wikijs instance: wiki.davste.at (diff)
syncoid/autosuspend: implement disk spindown mode
Diffstat (limited to 'roles/storage/zfs/syncoid/tasks')
-rw-r--r--roles/storage/zfs/syncoid/tasks/main.yml10
1 files changed, 9 insertions, 1 deletions
diff --git a/roles/storage/zfs/syncoid/tasks/main.yml b/roles/storage/zfs/syncoid/tasks/main.yml
index 6b3e227e..939dc110 100644
--- a/roles/storage/zfs/syncoid/tasks/main.yml
+++ b/roles/storage/zfs/syncoid/tasks/main.yml
@@ -71,14 +71,22 @@
enabled: yes
- name: enable autosuspend
- when: zfs_syncoid_autosuspend
+ when: zfs_syncoid_autosuspend is defined
block:
+ - name: install hdparm package
+ when: zfs_syncoid_autosuspend == 'disks'
+ apt:
+ name: hdparm
+ state: present
+
- name: create systemd override directory for sanoid timer
+ when: zfs_syncoid_autosuspend == 'system'
file:
path: /etc/systemd/system/sanoid.timer.d
state: directory
- name: disable persistence of sanoid timer
+ when: zfs_syncoid_autosuspend == 'system'
copy:
content: |
[Timer]