---
- name: Run common tasks
hosts: all
roles:
- common
- name: Set up routers
hosts: routers
- firewall
- router
- name: Restart if required
tasks:
- name: Reboot
ansible.builtin.reboot:
when: restart_required is defined