---
- name: "Install '{{ package_group }}': {{ package_groups[package_group]|join(', ') }}"
  become: yes
  pacman:
    state: latest
    name: "{{ package_groups[package_group] }}"

---
- name: "Install '{{ package_group }}': {{ package_groups[package_group]|join(', ') }}"
  become: yes
  pacman:
    state: latest
    name: "{{ package_groups[package_group] }}"
  when:
    - package_group is defined
    - package_groups[package_group] is defined

- name: "Install AUR '{{ aur_package_group }}': {{ aur_package_groups[aur_package_group]|join(', ') }}"
  become: yes
  become_user: aur_builder
  aur:
    name: "{{ aur_package_groups[aur_package_group] }}"
  when:
    - aur_package_group is defined
    - aur_package_groups[aur_package_group] is defined

Support package groups in aur
Support package groups in aur
