diff --git a/playbooks/roles/system/zfs/files/fstrim/fstrim.timer b/playbooks/roles/system/zfs/files/fstrim/fstrim.timer deleted file mode 100644 index 49f9f60..0000000 --- a/playbooks/roles/system/zfs/files/fstrim/fstrim.timer +++ /dev/null @@ -1,14 +0,0 @@ -[Unit] -Description=Discard unused blocks once a day -Documentation=man:fstrim -ConditionVirtualization=!container - -[Timer] -OnCalendar=daily -AccuracySec=1h -Persistent=true -RandomizedDelaySec=6000 -Unit=fstrim.service - -[Install] -WantedBy=timers.target diff --git a/playbooks/roles/system/zfs/tasks/include/fstrim.yml b/playbooks/roles/system/zfs/tasks/include/fstrim.yml deleted file mode 100644 index 6ba0fe7..0000000 --- a/playbooks/roles/system/zfs/tasks/include/fstrim.yml +++ /dev/null @@ -1,31 +0,0 @@ ---- -# Run fstrim daily on ZFS. It's a no-op on ZFS filesystems, but it will run on zvols mounted via -# fstab. Untrimmed zvol blocks occupy space in th ZFS pool. Therefore, this helps keep zvol space -# requirements down if they are busy. -- name: "fstrim : configure a daily fstrim timer" - ansible.builtin.copy: - src: "./fstrim/fstrim.timer" - dest: "/etc/systemd/system/fstrim.timer" - mode: 0644 - register: system_zfs_fstrim_timer_file - -- name: "fstrim : systemd daemon reload" - ansible.builtin.systemd: - daemon_reload: true - when: - system_zfs_fstrim_timer_file.changed - -# Disabling is necessary to make sure systemd uses the new timer file. -- name: "fstrim : disable fstrim.timer" - ansible.builtin.systemd: - name: "fstrim.timer" - enabled: false - state: "stopped" - when: - system_zfs_fstrim_timer_file.changed - -- name: "fstrim : enable fstrim.timer" - ansible.builtin.systemd: - name: "fstrim.timer" - enabled: true - state: "started" diff --git a/playbooks/roles/system/zfs/tasks/main.yml b/playbooks/roles/system/zfs/tasks/main.yml index b72e5a7..f5ab28d 100644 --- a/playbooks/roles/system/zfs/tasks/main.yml +++ b/playbooks/roles/system/zfs/tasks/main.yml @@ -18,7 +18,3 @@ - name: "play:system : role:zfs : tasks:load_key" ansible.builtin.import_tasks: "include/load_key.yml" tags: "system:zfs:load_key" - -- name: "play:system : role:zfs : tasks:fstrim" - ansible.builtin.import_tasks: "include/fstrim.yml" - tags: "system:zfs:fstrim"