Verified Commit a55e2e08 authored by Philipp Michael Breuch's avatar Philipp Michael Breuch
Browse files

Add paccache role

So far, no actions are taken to ensure the pacman cache does not grow permanently.
With this role, a post hook removes all cached packets except the last two.
parent 13b90c69
......@@ -37,6 +37,8 @@
branch: master
- role: paccache
- name: configure per-host kernel settings
Operation = Remove
Operation = Install
Operation = Upgrade
Type = Package
Target = *
Description = Remove all cached packages except the last two
When = PostTransaction
Exec = /usr/bin/paccache --remove --quiet --keep 2
- name: install pacman-contrib (for paccache)
name: pacman-contrib
- name: ensure /etc/pacmand.d/hooks exists
path: /etc/pacman.d/hooks
state: directory
owner: root
group: root
mode: '0755'
- name: copy pacman-cleanup.hook to /etc/pacman.d/hooks/
dest: /etc/pacman.d/hooks/pacman-cleanup.hook
src: pacman-cleanup.hook
owner: root
group: root
mode: '0644'
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment