25 lines
646 B
YAML
25 lines
646 B
YAML
|
---
|
||
|
|
||
|
- name: Check if Pikaur is installed
|
||
|
when: ansible_facts['os_family'] == "Archlinux"
|
||
|
ansible.builtin.stat:
|
||
|
follow: true
|
||
|
path: /usr/bin/pikaur
|
||
|
register: pikaur_stat
|
||
|
|
||
|
- name: Branch to Pikaur setup role if Pikaur is not installed
|
||
|
when:
|
||
|
- ansible_facts['os_family'] == "Archlinux"
|
||
|
- not pikaur_stat.stat.exists
|
||
|
ansible.builtin.include_role:
|
||
|
name: pikaur
|
||
|
|
||
|
- name: Install arr packages from AUR
|
||
|
when: ansible_facts['os_family'] == "Archlinux"
|
||
|
community.general.pacman:
|
||
|
executable: pikaur
|
||
|
name: "{{ item }}"
|
||
|
state: present
|
||
|
update_cache: "{{ item == arr_packages.0 }}"
|
||
|
loop: "{{ arr_packages }}"
|