- name: update to latest OS version (Debian)
  apt:
    name: '*'
    state: latest
    update_cache: yes
  register: upgrade_os_deb_register

- name: reboot to have latest Linux kernel packages in place
  reboot:
  when: upgrade_os_deb_register is changed
