Files
ansible_playbooks/modules/paru.yml
2022-06-13 22:18:13 +02:00

20 lines
563 B
YAML

- name: Create the `aur_builder` user
ansible.builtin.user:
name: aur_builder
create_home: yes
- name: Allow the `aur_builder` user to run `sudo pacman` without a password
ansible.builtin.lineinfile:
path: /etc/sudoers.d/11-install-aur_builder
line: 'aur_builder ALL=(ALL) NOPASSWD: /usr/bin/pacman'
create: yes
validate: 'visudo -cf %s'
- name: Install paru using makepkg if it isn't installed already
kewlfft.aur.aur:
name: paru
use: makepkg
state: present
become: yes
become_method: su
become_user: aur_builder