feat: implement maintenance and dev-tools roles and enhance maintenance script

This commit is contained in:
ja
2026-02-27 16:21:49 +01:00
parent 264cd31ce6
commit 21b6fa07d6
3 changed files with 90 additions and 22 deletions
+21
View File
@@ -0,0 +1,21 @@
---
- name: Ensure core workstation development tools are installed
community.general.pacman:
name:
- git
- base-devel
- ripgrep
- fd
- jq
- bat
- eza
- ansible
state: present
- name: Ensure legacy editor packages are removed
community.general.pacman:
name:
- code
- code-oss
- code-marketplace
state: absent
+28
View File
@@ -0,0 +1,28 @@
---
- name: Cleanup legacy VS Code remnants
ansible.builtin.file:
path: "{{ item }}"
state: absent
loop:
- "/home/mw/.vscode-oss"
- "/home/mw/.vscode"
- "/home/mw/.config/Code"
- "/home/mw/.config/Code - OSS"
- name: Cleanup legacy local AI tools
ansible.builtin.file:
path: "{{ item }}"
state: absent
loop:
- "/home/mw/.local/share/ollama"
- "/home/mw/.ollama"
- name: System maintenance tasks
ansible.builtin.command:
cmd: "{{ item }}"
loop:
- "paccache -r"
- "journalctl --vacuum-time=7d"
register: maintenance_result
changed_when: "'deleted' in maintenance_result.stdout or 'Vacuuming' in maintenance_result.stdout"
failed_when: false