--- - name: prepare dkms on scaleway boxes when: "'scaleway-kernel' in group_names" include_tasks: scaleway.yml - name: prepare dkms on for raspberry-pi when: "('id' in ansible_lsb and ansible_lsb.id == 'Raspbian') or ('raspios' in group_names)" include_tasks: raspberrypi.yml - name: prepare dkms on normal debian boxes when: - "'scaleway-kernel' not in group_names" - "'raspios' not in group_names" - "('id' not in ansible_lsb or ansible_lsb.id != 'Raspbian')" include_tasks: default.yml