aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/roles/yay/tasks/main.yml
blob: 49356c74a9349119b5c492791db93c7d8c7c3276 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
- name: Check if yay is installed
  command: yay --version
  register: yay_version
  changed_when: no
  failed_when: no

- when: yay_version.rc == 0
  block:
    - name: Upgrade packages
      kewlfft.aur.aur:
        use: yay
        update_cache: yes
        upgrade: yes
        aur_only: yes
      register: yay_result
      notify: reboot

    - debug:
        var: yay_result
      when: yay_result

    - name: Flush handlers
      meta: flush_handlers