mirror of
https://git.decapod.one/brethil/dotfiles
synced 2024-11-23 12:01:30 +01:00
ansible: add yay install playbook
This commit is contained in:
parent
927601f444
commit
925ef0901e
51
ansible/playbooks/yay.yaml
Normal file
51
ansible/playbooks/yay.yaml
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
---
|
||||||
|
- hosts: all
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
- name: Build directory
|
||||||
|
shell:
|
||||||
|
cmd: mkdir /home/build
|
||||||
|
creates: /home/build
|
||||||
|
register: build_dir
|
||||||
|
|
||||||
|
- name: Prepare build dir
|
||||||
|
shell: |
|
||||||
|
chgrp nobody /home/build
|
||||||
|
chmod g+ws /home/build
|
||||||
|
setfacl -m u::rwx,g::rwx /home/build
|
||||||
|
setfacl -d --set u::rwx,g::rwx,o::- /home/build
|
||||||
|
when:
|
||||||
|
- build_dir is defined
|
||||||
|
|
||||||
|
- name: yay repo
|
||||||
|
become: yes
|
||||||
|
become_method: sudo
|
||||||
|
become_user: nobody
|
||||||
|
git:
|
||||||
|
repo: https://aur.archlinux.org/yay.git
|
||||||
|
dest: /home/build/yay
|
||||||
|
version: master
|
||||||
|
register: repo
|
||||||
|
|
||||||
|
- name: Install go (yay dependency)
|
||||||
|
community.general.pacman:
|
||||||
|
name:
|
||||||
|
- go
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: build
|
||||||
|
become: yes
|
||||||
|
become_method: sudo
|
||||||
|
become_user: nobody
|
||||||
|
shell: |
|
||||||
|
cd /home/build/yay
|
||||||
|
makepkg
|
||||||
|
environment:
|
||||||
|
- GOCACHE: /home/build
|
||||||
|
- ANSIBLE_REMOTE_TMP: /home/build
|
||||||
|
|
||||||
|
- name: Install yay
|
||||||
|
community.general.pacman:
|
||||||
|
name:
|
||||||
|
- /home/build/yay/yay-*.tar.xz
|
||||||
|
state: present
|
Loading…
Reference in New Issue
Block a user