added support for AUR helper on Arcj

This commit is contained in:
2025-11-28 11:20:49 +01:00
parent e163947132
commit 6ba07f316b
3 changed files with 42 additions and 5 deletions

View File

@@ -0,0 +1,31 @@
---
- name: "[Arch] Install base-devel & git"
pacman:
name:
- base-devel
- git
state: present
when: ansible_facts['os_family'] == "Archlinux"
- name: "[Arch] Create AUR build user"
user:
name: "{{ aur_build_user }}"
groups: ['wheel']
create_home: yes
when: ansible_facts['os_family'] == "Archlinux"
- name: "[Arch] Allow AUR builder to use pacman without password"
lineinfile:
path: "/etc/sudoers.d/90-aur-builder"
line: "{{ aur_build_user }} ALL=(ALL) NOPASSWD: /usr/bin/pacman"
create: yes
validate: "visudo -cf %s"
when: ansible_facts['os_family'] == "Archlinux"
- name: "[Arch] Install AUR helper"
community.general.aur:
name: "{{ aur_helper }}"
state: present
use: makepkg
become_user: "{{ aur_build_user }}"
when: ansible_facts['os_family'] == "Archlinux"