paru: Fix installation
This commit is contained in:
17
playbook.yml
17
playbook.yml
@@ -127,13 +127,24 @@
|
|||||||
shell: /bin/bash
|
shell: /bin/bash
|
||||||
system: true
|
system: true
|
||||||
|
|
||||||
- name: build paru on arch
|
- name: check if paru is already installed
|
||||||
shell: |
|
shell: |
|
||||||
set -o errexit
|
set -o errexit
|
||||||
|
|
||||||
if pacman -Qi paru >/dev/null 2>&1; then
|
if pacman -Qi paru >/dev/null 2>&1; then
|
||||||
exit 100
|
exit 100
|
||||||
fi
|
fi
|
||||||
|
exit 0
|
||||||
|
args:
|
||||||
|
executable: /bin/bash
|
||||||
|
changed_when: false
|
||||||
|
check_mode: false
|
||||||
|
failed_when: result.rc not in (0, 100)
|
||||||
|
register: result
|
||||||
|
|
||||||
|
- name: build paru on arch
|
||||||
|
shell: |
|
||||||
|
set -o errexit
|
||||||
|
|
||||||
mkdir -p /tmp/paru-build
|
mkdir -p /tmp/paru-build
|
||||||
cd /tmp/paru-build
|
cd /tmp/paru-build
|
||||||
@@ -144,11 +155,9 @@
|
|||||||
makepkg
|
makepkg
|
||||||
args:
|
args:
|
||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
register: result
|
|
||||||
become: true # do not build as root!
|
become: true # do not build as root!
|
||||||
become_user: makepkg
|
become_user: makepkg
|
||||||
changed_when: result.rc != 100
|
when: result.rc != 100
|
||||||
failed_when: result.rc not in (0, 100)
|
|
||||||
|
|
||||||
- name: install paru
|
- name: install paru
|
||||||
shell: |
|
shell: |
|
||||||
|
|||||||
Reference in New Issue
Block a user