summaryrefslogtreecommitdiff
path: root/roles
diff options
context:
space:
mode:
Diffstat (limited to 'roles')
-rw-r--r--roles/core/base/defaults/main.yml2
-rw-r--r--roles/core/base/tasks/Debian.yml6
2 files changed, 8 insertions, 0 deletions
diff --git a/roles/core/base/defaults/main.yml b/roles/core/base/defaults/main.yml
index 4d164b60..1668ce05 100644
--- a/roles/core/base/defaults/main.yml
+++ b/roles/core/base/defaults/main.yml
@@ -35,3 +35,5 @@ base_packages_extra_host: []
base_packages_extra_group: []
base_intel_nic_stability_fix: false
+
+base_enable_fstrim: yes
diff --git a/roles/core/base/tasks/Debian.yml b/roles/core/base/tasks/Debian.yml
index 803b0173..2d6bb364 100644
--- a/roles/core/base/tasks/Debian.yml
+++ b/roles/core/base/tasks/Debian.yml
@@ -141,3 +141,9 @@
- name: apply stability fix/workaround for machines using intel NIC
when: base_intel_nic_stability_fix
import_tasks: intel-nic.yml
+
+- name: enable/disable fstrim timer
+ systemd:
+ name: fstrim.timer
+ state: "{{ base_enable_fstrim | ternary('started', 'stopped') }}"
+ enabled: "{{ base_enable_fstrim }}"