diff --git a/basic-system/files/fstrim b/basic-system/files/fstrim
new file mode 100755
index 0000000000000000000000000000000000000000..b1816b2b6aeb7df5f9efd711cd7e887c65aa06bc
--- /dev/null
+++ b/basic-system/files/fstrim
@@ -0,0 +1,5 @@
+#!/bin/sh
+set -e
+if command -v fstrim >/dev/null; then
+    fstrim -a
+fi
diff --git a/basic-system/tasks/main.yml b/basic-system/tasks/main.yml
index 9f0ece02a89756e14a1ca32931b8cc60113b6e94..a8b06fd93914ad7c1ff88cce945d8b9d4e5019bd 100644
--- a/basic-system/tasks/main.yml
+++ b/basic-system/tasks/main.yml
@@ -54,6 +54,16 @@
   tags:
     - etckeeper
 
+- name: Configure fstrim cronjob
+  copy:
+    src: fstrim
+    dest: /etc/cron.daily/fstrim
+    owner: root
+    group: root
+    mode: '0755'
+  tags:
+    - fstrim
+
 - include: logging.yml
 - meta: flush_handlers
 - include: network.yml