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,2 @@
aur_helper: "paru"
aur_build_user: "aur_builder"

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"

View File

@@ -1,6 +1,6 @@
- name: system setup | utilities | install utility packages individually
tags: packages,system,system setup
package:
ansible.builtin.package:
state: latest
name: "{{ item }}"
loop:
@@ -32,7 +32,7 @@
- name: system setup | utilities | install cloud-init and gemu guest agent
tags: packages,system,system setup
package:
ansible.builtin.package:
state: latest
name: "{{ item }}"
loop:
@@ -46,7 +46,7 @@
- name: system setup | utilities | install utilities (arch)
tags: packages,system,system setup
package:
ansible.builtin.package:
state: latest
name: "{{ item }}"
loop:
@@ -64,7 +64,7 @@
- name: system setup | utilities | install man-pages (arch)
tags: packages,system,settings
pacman:
community.general.pacman:
state: latest
name: "{{ item }}"
loop:
@@ -76,7 +76,7 @@
- name: system setup | utilities | install utilities (debian)
tags: packages,system,system setup
package:
ansible.builtin.package:
state: latest
name: "{{ item }}"
loop:
@@ -89,3 +89,7 @@
- "{{ python_passlib_package }}"
when: ansible_distribution in [ "Debian", "Ubuntu" ]
ignore_errors: true
- name: system setup | utilities | install AUR helper (arch)
ansible.builtin.import_tasks: aur_helper.yml
when: ansible_facts['os_family'] == "Archlinux"