From facdd63fe173b51c6d9de29ccc2167b0d7a45b6f Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sat, 21 Jan 2023 23:03:00 +0100 Subject: syncoid/autosuspend: implement disk spindown mode --- roles/storage/zfs/syncoid/tasks/main.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'roles/storage/zfs/syncoid/tasks') 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] -- cgit v1.2.3