mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-10-10 02:38:10 +02:00
- Move AUR update task into dev-yay role - Centralize defaults (AUR_HELPER, AUR_BUILDER_USER, etc.) - Remove separate update-yay role (redundant) See conversation with ChatGPT https://chatgpt.com/share/68da3219-6d78-800f-92ad-0a5061bac8be and related work item: https://open.project.infinito.nexus/projects/cymais/work_packages/341/activity
59 lines
1.3 KiB
YAML
59 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
|
|
|
|
- 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/run_once.yml
|