43 lines
1012 B
YAML

---
- name: Install devel packages
community.general.pacman:
name:
- 'base-devel'
- 'git'
when: ansible_pkg_mgr == "pacman"
- name: Disable package compression
ansible.builtin.replace:
path: '/etc/makepkg.conf'
regexp: "^PKGEXT=.*$"
replace: "PKGEXT='.pkg.tar'"
- name: Create AUR build user
ansible.builtin.user:
name: aur_builder
system: yes
home: /var/lib/pacman/aur/
password_lock: yes
shell: /usr/bin/false
when: ansible_pkg_mgr == "pacman"
- name: Allow AUR build user to run Pacman as root
ansible.builtin.lineinfile:
path: /etc/sudoers.d/aur_builder-allow-to-sudo-pacman
state: present
line: "aur_builder ALL=(ALL) NOPASSWD: /usr/bin/pacman"
validate: /usr/sbin/visudo -cf %s
create: yes
when: ansible_pkg_mgr == "pacman"
- name: Install AUR helper using makepkg
kewlfft.aur.aur:
name: paru-bin
use: makepkg
state: present
become: yes
become_user: aur_builder
when: ansible_pkg_mgr == "pacman"