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 @@
url: https://git.cs.uni-paderborn.de/rbfsmi/rbfsmi-ansible.git
branch: master
- role: paccache
post_tasks:
- name: configure per-host kernel settings
sysctl:
......
[Trigger]
Operation = Remove
Operation = Install
Operation = Upgrade
Type = Package
Target = *
[Action]
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)
package:
name: pacman-contrib
- name: ensure /etc/pacmand.d/hooks exists
file:
path: /etc/pacman.d/hooks
state: directory
owner: root
group: root
mode: '0755'
- name: copy pacman-cleanup.hook to /etc/pacman.d/hooks/
copy:
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