ansible-role-fstrim/tasks/main.yml
2018-03-09 15:15:16 +01:00

18 lines
669 B
YAML

---
- name: Install custom fstrim.service
copy: src=fstrim.service dest=/etc/systemd/system/
notify: systemd-daemon-reload
- name: Install fstrim.timer on Debian
copy: src=fstrim.timer.debian dest=/etc/systemd/system/fstrim.timer
when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'
notify: systemd-daemon-reload
- name: Configure fstrim.timer
file: path=/etc/systemd/system/fstrim.timer.d state=directory
- name: Configure fstrim.timer
copy: src=10-daily.conf dest=/etc/systemd/system/fstrim.timer.d/10-daily.conf
notify: systemd-daemon-reload
- name: Enable fstrim.timer
service: name=fstrim.timer enabled=yes state=started