1
0
IaC/ansible/roles/arr/tasks/main.yaml

25 lines
646 B
YAML
Raw Normal View History

2024-04-22 05:46:14 -04:00
---
- 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 }}"