---
- hosts: all
  become: true
  pre_tasks:
    - name: Load local vault variables when available
      tags: [always]
      ansible.builtin.include_vars:
        file: "{{ playbook_dir }}/../secrets/vault.yml"
      when: lookup('ansible.builtin.fileglob', playbook_dir + '/../secrets/vault.yml', errors='ignore') != ''

  roles:
    - dotfiles_common

- hosts: void
  become: true

  roles:
    - packages_void
    - services_runit
    - profile_desktop_i3

- hosts: ubuntu_workstation
  become: true

  roles:
    - packages_ubuntu
    - services_systemd
    - profile_workstation_gnome

- hosts: ubuntu_server
  become: true

  roles:
    - packages_ubuntu
    - services_systemd
    - profile_server
