enable trim timer

This commit is contained in:
Pig Monkey 2016-01-20 17:41:45 -08:00
parent 13d82bbffe
commit 90190826e1
2 changed files with 10 additions and 0 deletions

View file

@ -6,6 +6,7 @@
- { role: grsec, tags: ['grsec'] }
- { role: ssh, tags: ['ssh'] }
- { role: dotfiles, tags: ['dotfiles'] }
- { role: ssd, tags: ['ssd'] }
- { role: fonts, tags: ['fonts'] }
- { role: x, tags: ['x'] }
- { role: slim, tags: ['slim'] }

9
roles/ssd/tasks/main.yml Normal file
View file

@ -0,0 +1,9 @@
---
- name: Check for TRIM support
shell: "hdparm -I /dev/sda | grep TRIM"
register: hdparm
ignore_errors: True
- name: Enable and start weekly filesystem TRIM timer
service: name=fstrim.timer enabled=yes state=started
when: "hdparm.rc == 0"