---
- hosts: all
  gather_facts: yes
  become: yes
  roles:
    - microk8s/debian # Change to redhat if using a redhat distro
    - microk8s/common
    - btrix/deploy

  handlers:
  - name: Reboot System
    ansible.builtin.reboot:
    when:
      - skip_handlers | default("false") == "false"

  - name: microk8s ready
    ansible.builtin.command:
      cmd: microk8s.status --wait-ready
    changed_when: false
    when:
      - skip_handlers | default("false") == "false"
