1
0
mirror of https://git.decapod.one/brethil/dotfiles synced 2024-11-21 19:11:30 +01:00
dotfiles/ansible/yay/tasks/main.yml

Failed to ignore revisions in .git-blame-ignore-revs.

54 lines
1.0 KiB
YAML
Raw Permalink Normal View History

2024-07-04 12:21:21 +02:00
---
- name: Create build directory
file:
path: "/home/build"
state: directory
mode: "0700"
owner: nobody
- name: Make sure requirements are installed
community.general.pacman:
update_cache: yes
name:
- base-devel
- git
- go
- sudo
state: present
become: true
- name: Clone yay repo
become: true
become_method: sudo
become_user: nobody
git:
repo: https://aur.archlinux.org/yay.git
dest: /home/build/yay
version: master
clone: true
force: true
- name: build
become: true
become_method: sudo
become_user: nobody
shell: |
cd /home/build/yay
makepkg -f
environment:
- GOCACHE: /tmp/gocache
- ANSIBLE_REMOTE_TMP: /tmp/ansible
- name: Get built package
shell: |
ls -rt /home/build/yay/yay*.pkg.tar.zst | grep -v debug | tail -1
register: yay_package
- debug:
msg: "Built {{ yay_package.stdout }}"
- name: Install yay
community.general.pacman:
name: "{{ yay_package.stdout }}"
state: present