base/tasks/yay.yml

33 lines
552 B
YAML

# Yay building & install task
---
- name: Clone yay pkg
become: yes
become_user: pkg
git:
repo: https://aur.archlinux.org/yay.git
dest: /home/pkg/yay
clone: yes
update: yes
- name: Build yay
become: yes
become_user: pkg
command:
chdir: /home/pkg/yay
cmd: makepkg -f
creates: "*.pkg.*"
- name: Find pkg
find:
paths: /home/pkg/yay
file_type: file
patterns: '*.pkg*'
register: yay_pkgs
- name: Install yay
community.general.pacman:
name: "{{ yay_pkgs.files[0].path }}"
state: present