51_install_sysupdate_function.yml - Usage Guide
Purpose
Installs the sysupdate function into the target user’s shell. In an interactive session the function runs apt + snap + flatpak maintenance and light cleanup. Shared model: 43_install_kubectl_aliases.
This playbook does not run maintenance; it only places the function. To apply the same maintenance remotely with Ansible, use 52_run_sysupdate. For package updates on Kubernetes nodes with drain/reboot, use 41_patch_and_reboot_nodes.
How to run
ansible-playbook -i inventories/musteri_a/hosts.ini playbooks/51_install_sysupdate_function.yml
ansible-playbook -i inventories/musteri_a/hosts.ini playbooks/51_install_sysupdate_function.yml \
--extra-vars 'shell_aliases_state=absent'
After install, on the target host:
source ~/.bashrc # bash login shell; use ~/.zshrc or ~/.profile if that is the login shell
sysupdate
What the function does
- Disk usage (before)
apt update/upgrade -y/autoremove/autoclean- If snap is present:
snap refreshand cleanup of disabled revisions - If Flatpak is present:
flatpak updateand unused removal - Thumbnail cache older than 30 days
- Trash count (does not empty it)
- Duration, disk (after),
/var/run/reboot-requiredwarning
The function asks for sudo. It does not reboot.