feat: implement maintenance and dev-tools roles and enhance maintenance script
This commit is contained in:
@@ -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
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user