Files
mw-pfeddersheim-workstation/ansible/roles/dev-tools/tasks/main.yml
T
mw 07bd3f8699 fix(ansible): harden AUR install task and rename ansible_user to local_user
- AUR task: replace loop with single paru call, use changed_when: false
  (stdout-only match never fired under non-TTY runs) and failed_when: false
  so transient AUR failures don't abort the play
- Rename ansible_user -> local_user to avoid shadowing the connection
  magic var; update the two references in roles/common/tasks/main.yml
2026-06-24 20:14:33 +02:00

198 lines
5.0 KiB
YAML

---
- name: Ensure core workstation development tools are installed
community.general.pacman:
name:
# Build essentials
- git
- base-devel
# CLI tools (infra.standards.md §4)
- ripgrep
- ripgrep-all
- fd
- jq
- bat
- eza
- zoxide
- fzf
- gum
- dust
- bottom
- scrot
- shellcheck
- shfmt
# Git providers CLI
- github-cli
- tea
- glab
# Python toolchain
- ruff
- uv
# DevOps & IaC
- ansible
- terraform
- docker
- docker-buildx
- docker-compose
- podman
- cmake
# Security & supply chain
- cosign
- syft
- trivy
- certbot
# Container inspection
- dive
# Email CLI
- himalaya
# Document toolchain (markdown-to-pdf skill)
- typst
- pandoc
# WordPress CLI
- wp-cli
# C/C++ toolchain (cpp skill)
- clang
# Windows installer inspection (amicron-version-inspection skill)
- perl-image-exiftool
- icoutils
- innoextract-git
# CalDAV tools (caldav-webcal skill)
- khal
- vdirsyncer
# 3D/CAD tools (openscad, freecad, f3d skills)
- openscad
- freecad
- f3d
# Terminal
- kitty
# NVIDIA VA-API video decode for Chrome on Wayland
- libva-utils
- libva-nvidia-driver
state: present
- name: Ensure Node.js global CLI tools are installed
become: true
become_user: "{{ system_user }}"
command: pnpm add -g @marp-team/marp-cli
changed_when: false
tags: [nodejs, marp]
- name: Ensure Python CLI tools are installed via pipx
become: true
become_user: "{{ system_user }}"
command: "pipx install {{ item }}"
loop:
- semgrep
- huggingface_hub[cli]
changed_when: false
tags: [python, pipx]
- name: Ensure JetBrains Toolbox and IntelliJ IDEA Ultimate are installed from AUR
become: true
become_user: "{{ system_user }}"
command: paru -S --noconfirm --needed jetbrains-toolbox intellij-idea-ultimate-edition
changed_when: false
failed_when: false
tags: [jetbrains, aur]
- name: Ensure redundant and non-core software is removed
community.general.pacman:
name:
- firefox-developer-edition
- audacity
- kdenlive
- obs-studio
- shotcut
- qgis
- tipp10
- xournalpp
- bleachbit
- reiserfsprogs
- dmraid
- virt-manager
- guvcview
- helvum
- qpwgraph
- glmark2
- act-git
- oha
- unetbootin
- ventoy
- chromium-widevine
state: absent
- name: Ensure legacy editor packages are removed
community.general.pacman:
name:
- code
- code-oss
- code-marketplace
state: absent
- name: Configure Chrome flags for NVIDIA Wayland acceleration
copy:
dest: "/home/{{ system_user }}/.config/chrome-flags.conf"
content: |
--ozone-platform=wayland
--disable-seccomp-filter-sandbox
--disable-features=Vulkan,VulkanFromANGLE,DefaultANGLEVulkan
--use-angle=gl
--enable-features=VaapiOnNvidiaGPUs,VaapiIgnoreDriverChecks,AcceleratedVideoDecodeLinuxZeroCopyGL,AcceleratedVideoDecodeLinuxGL
--password-store=gnome-libsecret
owner: "{{ system_user }}"
group: "{{ system_user }}"
mode: '0644'
tags: [chrome, nvidia, wayland]
- name: Remove dead BROWSER_CDP_URL from .bashrc
ansible.builtin.lineinfile:
path: "/home/{{ system_user }}/.bashrc"
regexp: '.*BROWSER_CDP_URL.*'
state: absent
become: yes
become_user: "{{ system_user }}"
tags: [chrome, shell, cleanup]
- name: Fix kitty cursor keys by removing TERM override in .bashrc
ansible.builtin.lineinfile:
path: "/home/{{ system_user }}/.bashrc"
regexp: '^export TERM=xterm-256color'
line: '# export TERM=xterm-256color # Fix: allow kitty to set its own TERM for cursor keys'
state: present
become: yes
become_user: "{{ system_user }}"
tags: [kitty, shell]
- name: Ensure kitty configuration directory exists
ansible.builtin.file:
path: "/home/{{ system_user }}/.config/kitty"
state: directory
owner: "{{ system_user }}"
group: "{{ system_user }}"
mode: '0755'
become: yes
become_user: "{{ system_user }}"
tags: [kitty]
- name: Configure kitty for proper terminal behavior
ansible.builtin.copy:
dest: "/home/{{ system_user }}/.config/kitty/kitty.conf"
content: |
# Managed by Ansible - saTway DevOps
shell bash
editor vim
# Shell integration is enabled by default in kitty 0.24.0+
# but we can explicitly enable it for clarity.
shell_integration enabled
# Ensure cursor keys work correctly by not overriding TERM in shell
# (Handled via .bashrc fix)
include /home/mw/.config/kitty/kitty-cline-keybindings.conf
owner: "{{ system_user }}"
group: "{{ system_user }}"
mode: '0644'
become: yes
become_user: "{{ system_user }}"
tags: [kitty]