mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-12-12 12:16:06 +00:00
60 lines
1.3 KiB
YAML
60 lines
1.3 KiB
YAML
- name: Include dependencies
|
|
include_role:
|
|
name: '{{ item }}'
|
|
loop:
|
|
- dev-fakeroot
|
|
- dev-git
|
|
- dev-base-devel
|
|
|
|
- name: Install yay build prerequisites
|
|
community.general.pacman:
|
|
name:
|
|
- base-devel
|
|
- patch
|
|
state: present
|
|
|
|
- name: Create the AUR builder user
|
|
become: true
|
|
ansible.builtin.user:
|
|
name: "{{ AUR_BUILDER_USER }}"
|
|
create_home: yes
|
|
group: "{{ AUR_BUILDER_GROUP }}"
|
|
|
|
- name: Allow AUR builder to run pacman without password
|
|
become: true
|
|
ansible.builtin.lineinfile:
|
|
path: "{{ AUR_BUILDER_SUDOERS_PATH }}"
|
|
line: '{{ AUR_BUILDER_USER }} ALL=(ALL) NOPASSWD: /usr/bin/pacman'
|
|
create: yes
|
|
validate: 'visudo -cf %s'
|
|
|
|
- name: Clone yay from AUR
|
|
become: true
|
|
become_user: "{{ AUR_BUILDER_USER }}"
|
|
git:
|
|
repo: https://aur.archlinux.org/yay.git
|
|
dest: "/home/{{ AUR_BUILDER_USER }}/yay"
|
|
clone: yes
|
|
update: yes
|
|
depth: 1
|
|
|
|
- name: Build and install yay
|
|
become: true
|
|
become_user: "{{ AUR_BUILDER_USER }}"
|
|
shell: |
|
|
cd /home/{{ AUR_BUILDER_USER }}/yay
|
|
makepkg -si --noconfirm
|
|
args:
|
|
creates: /usr/bin/yay
|
|
|
|
- name: upgrade the system using yay, only act on AUR packages.
|
|
become: true
|
|
become_user: "{{ AUR_BUILDER_USER }}"
|
|
kewlfft.aur.aur:
|
|
upgrade: yes
|
|
use: "{{ AUR_HELPER }}"
|
|
aur_only: yes
|
|
when: MODE_UPDATE | bool
|
|
|
|
- include_tasks: utils/once/flag.yml
|