common/tasks/apt/cleanup.yaml

17 lines
333 B
YAML

---
# clean apt cache
- name: "apt - clean cache"
ansible.builtin.apt:
clean: true
when: 'ansible_os_family == "Debian"'
tags: "apt-cleanup"
# run fstrim if target is a VM
- name: "fstrim"
ansible.builtin.command: "fstrim /"
changed_when: false
failed_when: false
tags: "apt-cleanup"
when:
- 'type == "vm"'