- hosts: all
  become: true
  become_method: sudo
  gather_facts: true

  pre_tasks:
    - name: check if in chroot
      shell: '[ "$(stat -c %d:%i /)" != "$(stat -c %d:%i /proc/1/root/.)" ]
             && echo true || echo false'
      register: chroot
      changed_when: false
      tags: always

    - name: set chroot_mode
      set_fact: chroot_mode="{{ true if chroot.stdout == 'true' else false }}"
      tags: always

    - debug: msg="chroot mode is {{ chroot_mode }}" verbosity=1
      tags: always

  roles:
    - time-zone
    - locale
    - network
    - root
    - systemd-boot
    - reflector
    - users
    - sudo
    - systemd-timesyncd
    - packages
    - networkmanager
    - pulseaudio
    - xorg
    - nvidia
    - vulkan
    - gnome
    - yubikey
    - openvpn
    - gsettings
    - hidpi

- hosts: all
  become: true
  become_method: sudo
  gather_facts: true

  pre_tasks:
    - name: check if in chroot
      shell: '[ "$(stat -c %d:%i /)" != "$(stat -c %d:%i /proc/1/root/.)" ]
             && echo true || echo false'
      register: chroot
      changed_when: false
      tags: always

    - name: set chroot_mode
      set_fact: chroot_mode="{{ true if chroot.stdout == 'true' else false }}"
      tags: always

    - debug: msg="chroot mode is {{ chroot_mode }}" verbosity=1
      tags: always

  roles:
    - time-zone
    - locale
    - network
    - root
    - reflector
    - systemd-boot
    - users
    - sudo
    - systemd-timesyncd
    - packages
    - networkmanager
    - pulseaudio
    - xorg
    - nvidia
    - vulkan
    - gnome
    - yubikey
    - openvpn
    - gsettings
    - hidpi

Move reflector role up so systemd-boot benefits
Move reflector role up so systemd-boot benefits
