---
- name: Prepare host system
  hosts: hostsystem
  become: true
  roles:
    - host

# Get python onto void - otherwise we can not interact through ansible
- name: Bootstrap void python
  hosts: target_system
  gather_facts: false
  tasks:
    - name: install python
      raw: test -e /usr/bin/python || xbps-install -y python
      register: python_install
      changed_when: "'installed successfully' in python_install.stdout"

- name: Set up target system
  hosts: target_system
  become: true
  roles:
    - role: base
      tags: base
    - role: acpi
      tags: acpi
    - role: user
      tags: user
    - role: network
      tags: network
    - role: backup
      tags: backup
    - role: keyd
      tags: keyd

    - role: wayland
      tags: wayland
    - role: display_manager
      tags: display_manager
    - role: pipewire
      tags: pipewire
    - role: bluetooth
      tags: bluetooth
    - role: power
      tags: power
    - role: gnupg
      tags: gnupg

    - role: fonts
      tags: fonts
    - role: packages
      tags: packages