Sanitized mirror from private repository - 2026-04-04 03:48:45 UTC
This commit is contained in:
26
docs/advanced/ansible/playbooks/cleanup.yml
Normal file
26
docs/advanced/ansible/playbooks/cleanup.yml
Normal file
@@ -0,0 +1,26 @@
|
||||
---
|
||||
- name: Clean up unused packages and temporary files
|
||||
hosts: all
|
||||
become: true
|
||||
tasks:
|
||||
- name: Autoremove unused packages
|
||||
apt:
|
||||
autoremove: yes
|
||||
when: ansible_os_family == "Debian"
|
||||
|
||||
- name: Clean apt cache
|
||||
apt:
|
||||
autoclean: yes
|
||||
when: ansible_os_family == "Debian"
|
||||
|
||||
- name: Clear temporary files
|
||||
file:
|
||||
path: /tmp
|
||||
state: absent
|
||||
ignore_errors: true
|
||||
|
||||
- name: Recreate /tmp directory
|
||||
file:
|
||||
path: /tmp
|
||||
state: directory
|
||||
mode: '1777'
|
||||
Reference in New Issue
Block a user