---
- name: Group hosts by package manager
  hosts:
    - all
  tasks:
    - name: Group hosts by package manager
      group_by:
        key: pkg_mgr_{{ ansible_pkg_mgr }}
      tags:
        - always

- name: Bootstrap Debian hosts
  hosts:
    - pkg_mgr_apt
  tags:
    - debian
    - update
  gather_facts: false
  roles:
    - debian_bootstrap

- name: Bootstrap OpenWRT hosts
  hosts:
    - pkg_mgr_opkg
  tags:
    - openwrt
    - update
  gather_facts: false
  roles:
    - openwrt_bootstrap

- name: Bootstrap OpenBSD hosts
  hosts:
    - pkg_mgr_openbsd_pkg
  tags:
    - openbsd
    - update
  gather_facts: false
  roles:
    - openbsd_bootstrap
