initial commit

This commit is contained in:
neingeist 2016-03-06 23:05:05 +01:00
commit 82fe1a0b1a
5 changed files with 24 additions and 0 deletions

5
files/10-daily.conf Normal file
View file

@ -0,0 +1,5 @@
[Unit]
Description=Discard unused blocks once a day
[Timer]
OnCalendar=daily

8
files/fstrim.service Normal file
View file

@ -0,0 +1,8 @@
# Called by /usr/lib/systemd/system/fstrim.timer from util-linux
# Add `-v` flag so that results can be reviewed in jouranctl
[Unit]
Description=Discard unused blocks
[Service]
Type=oneshot
ExecStart=/sbin/fstrim -av

1
handlers/main.yml Normal file
View file

@ -0,0 +1 @@
- include: systemd-daemon-reload.yml

View file

@ -0,0 +1,3 @@
---
- name: systemd-daemon-reload
shell: systemctl daemon-reload

7
tasks/main.yml Normal file
View file

@ -0,0 +1,7 @@
---
- file: path=/etc/systemd/system/fstrim.timer.d state=directory
- copy: src=10-daily.conf dest=/etc/systemd/system/fstrim.timer.d/10-daily.conf
notify: systemd-daemon-reload
- service: name=fstrim.timer enabled=yes state=started
- copy: src=fstrim.service dest=/etc/systemd/system/
notify: systemd-daemon-reload