From b02a8c40c76cb2e61c7a664ec156407101201a24 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Wed, 25 Jan 2023 14:40:44 +0100 Subject: move tool existence conditionals to role common --- roles/yay/tasks/main.yml | 34 +++++++++++++--------------------- 1 file changed, 13 insertions(+), 21 deletions(-) (limited to 'roles/yay/tasks') diff --git a/roles/yay/tasks/main.yml b/roles/yay/tasks/main.yml index a8a1c70..bd8effb 100644 --- a/roles/yay/tasks/main.yml +++ b/roles/yay/tasks/main.yml @@ -1,23 +1,15 @@ -- name: Check if yay is installed - command: yay --version - register: yay_version - changed_when: false - failed_when: false +- name: Upgrade packages + kewlfft.aur.aur: + use: yay + update_cache: true + upgrade: true + aur_only: true + register: yay_result + notify: reboot -- when: yay_version.rc == 0 - block: - - name: Upgrade packages - kewlfft.aur.aur: - use: yay - update_cache: true - upgrade: true - aur_only: true - register: yay_result - notify: reboot +- debug: + var: yay_result + when: yay_result - - debug: - var: yay_result - when: yay_result - - - name: Flush handlers - meta: flush_handlers +- name: Flush handlers + meta: flush_handlers -- cgit v1.2.3