mirror of
https://git.decapod.one/brethil/dotfiles
synced 2024-11-22 19:41:31 +01:00
54 lines
1.0 KiB
YAML
54 lines
1.0 KiB
YAML
|
---
|
||
|
- 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
|