diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2023-01-25 14:40:44 +0100 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2023-01-25 14:40:44 +0100 |
commit | b02a8c40c76cb2e61c7a664ec156407101201a24 (patch) | |
tree | 0e046b783331db1bbba78bee75dbdac2e67e420a /roles/yay | |
parent | linting (diff) | |
download | maintenance-b02a8c40c76cb2e61c7a664ec156407101201a24.tar.gz maintenance-b02a8c40c76cb2e61c7a664ec156407101201a24.zip |
move tool existence conditionals to role common
Diffstat (limited to 'roles/yay')
-rw-r--r-- | roles/yay/meta/main.yml | 3 | ||||
-rw-r--r-- | roles/yay/tasks/main.yml | 34 |
2 files changed, 15 insertions, 22 deletions
diff --git a/roles/yay/meta/main.yml b/roles/yay/meta/main.yml index 99c8bbf..d708443 100644 --- a/roles/yay/meta/main.yml +++ b/roles/yay/meta/main.yml @@ -1,2 +1,3 @@ dependencies: - - role: pacman + - role: common + - {role: pacman, when: has_pacman} 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 |