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
This commit is contained in:
mw
2026-06-24 20:14:33 +02:00
parent feaccf201d
commit 07bd3f8699
3 changed files with 13 additions and 4 deletions
+4 -4
View File
@@ -3,8 +3,8 @@
file: file:
path: "{{ ansible_env.HOME }}/.config/kitty" path: "{{ ansible_env.HOME }}/.config/kitty"
state: directory state: directory
owner: "{{ ansible_user }}" owner: "{{ local_user }}"
group: "{{ ansible_user }}" group: "{{ local_user }}"
mode: '0755' mode: '0755'
tags: [kitty, terminal] tags: [kitty, terminal]
@@ -12,8 +12,8 @@
template: template:
src: kitty.conf.j2 src: kitty.conf.j2
dest: "{{ ansible_env.HOME }}/.config/kitty/kitty.conf" dest: "{{ ansible_env.HOME }}/.config/kitty/kitty.conf"
owner: "{{ ansible_user }}" owner: "{{ local_user }}"
group: "{{ ansible_user }}" group: "{{ local_user }}"
mode: '0644' mode: '0644'
vars: vars:
kitty_config_dir: "{{ ansible_env.HOME }}/.config/kitty" kitty_config_dir: "{{ ansible_env.HOME }}/.config/kitty"
+8
View File
@@ -86,6 +86,14 @@
changed_when: false changed_when: false
tags: [python, pipx] 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 - name: Ensure redundant and non-core software is removed
community.general.pacman: community.general.pacman:
name: name:
+1
View File
@@ -1,5 +1,6 @@
# mw-pfeddersheim-workstation variables # mw-pfeddersheim-workstation variables
system_user: mw system_user: mw
local_user: "{{ system_user }}"
root_filesystem_uuid: 2aeade2e-b169-4964-8cbd-bb7356320b51 root_filesystem_uuid: 2aeade2e-b169-4964-8cbd-bb7356320b51
root_filesystem_mount_opts: noatime root_filesystem_mount_opts: noatime
swap_file_path: /swapfile swap_file_path: /swapfile