initial commit
This commit is contained in:
commit
82fe1a0b1a
5 changed files with 24 additions and 0 deletions
5
files/10-daily.conf
Normal file
5
files/10-daily.conf
Normal file
|
@ -0,0 +1,5 @@
|
|||
[Unit]
|
||||
Description=Discard unused blocks once a day
|
||||
|
||||
[Timer]
|
||||
OnCalendar=daily
|
8
files/fstrim.service
Normal file
8
files/fstrim.service
Normal 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
1
handlers/main.yml
Normal file
|
@ -0,0 +1 @@
|
|||
- include: systemd-daemon-reload.yml
|
3
handlers/systemd-daemon-reload.yml
Normal file
3
handlers/systemd-daemon-reload.yml
Normal file
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
- name: systemd-daemon-reload
|
||||
shell: systemctl daemon-reload
|
7
tasks/main.yml
Normal file
7
tasks/main.yml
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue