aboutsummaryrefslogtreecommitdiffstats
path: root/roles/_workstation/makepkg/tasks/main.yml
diff options
context:
space:
mode:
authorRomain Gonçalves <me@rgoncalves.se>2022-12-29 15:20:47 +0100
committerRomain Gonçalves <me@rgoncalves.se>2022-12-29 15:54:09 +0100
commitcadc8824e093f37c36263b2aefba3cd680389f0b (patch)
treef25fec4782f585166b314e49b0c30577ecfe9694 /roles/_workstation/makepkg/tasks/main.yml
parent8ce56f15e0751870b56805010241dcfe8389b10f (diff)
downloadrules-cadc8824e093f37c36263b2aefba3cd680389f0b.tar.gz
feat(roles/_workstation): add makepkg role
Diffstat (limited to 'roles/_workstation/makepkg/tasks/main.yml')
-rw-r--r--roles/_workstation/makepkg/tasks/main.yml16
1 files changed, 16 insertions, 0 deletions
diff --git a/roles/_workstation/makepkg/tasks/main.yml b/roles/_workstation/makepkg/tasks/main.yml
new file mode 100644
index 0000000..1a31fd9
--- /dev/null
+++ b/roles/_workstation/makepkg/tasks/main.yml
@@ -0,0 +1,16 @@
+---
+
+- name: "check that package is present: {{ makepkg_package_name }}"
+ ansible.builtin.command:
+ cmd: pacman -Q {{ makepkg_package_name }}
+ register: makepkg_result_check_package
+ changed_when:
+ - makepkg_result_check_package.rc != 0
+ failed_when:
+ - makepkg_result_check_package.rc == 1
+ - "'was not found' not in makepkg_result_check_package.stderr"
+
+- name: include install task # noqa: no-handler
+ ansible.builtin.include_tasks:
+ file: install.yml
+ when: makepkg_result_check_package.changed
remember that computers suck.