diff options
| author | Ahmed Abdelhalim <[email protected]> | 2025-12-02 22:43:40 +0100 |
|---|---|---|
| committer | Ahmed Abdelhalim <[email protected]> | 2025-12-02 22:44:36 +0100 |
| commit | 73dd618c73224b3ceac031102daf1bf85bc2c841 (patch) | |
| tree | 0339ea232fe4250f753a5846a29c57f6e3eb2be8 /roles/yay/tasks | |
| parent | fc1491ba66118fcb53190f618ef22351cb0eed55 (diff) | |
Add yay role on arch w/testing
Diffstat (limited to 'roles/yay/tasks')
| -rw-r--r-- | roles/yay/tasks/main.yml | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/roles/yay/tasks/main.yml b/roles/yay/tasks/main.yml new file mode 100644 index 00000000..b9d0ff5f --- /dev/null +++ b/roles/yay/tasks/main.yml @@ -0,0 +1,37 @@ +--- +- name: "Ensure base-devel is installed" + become: true + ansible.builtin.package: + name: "base-devel" + state: "present" + +- name: "Check if yay exists" + ansible.builtin.stat: + path: "/usr/bin/yay" + register: yay_binary + +- name: "Install yay" + when: not yay_binary.stat.exists + block: + - name: "Clone yay-bin" + ansible.builtin.git: + repo: "https://aur.archlinux.org/yay-bin.git" + dest: "/tmp/yay-bin" + clone: true + update: false + single_branch: true + version: "master" + + - name: "Build yay-bin" + ansible.builtin.command: + cmd: "makepkg --syncdeps --noconfirm" + chdir: "/tmp/yay-bin" + args: + creates: "/tmp/yay-bin/yay-bin-*.pkg.tar.zst" + + - name: "Install yay bin" + become: true + ansible.builtin.shell: + cmd: "pacman -U --noconfirm /tmp/yay-bin/yay-bin-*.pkg.tar.zst" + args: + creates: "/usr/bin/yay" |
