---
- block:
  - name: Install Ubuntu kernel
    apt:
      name:
        - linux-headers-{{ zoox_kernel_version }}
        - linux-image-{{ zoox_kernel_version }}
        - linux-tools-{{ zoox_kernel_version }}
      cache_valid_time: "{{ apt_cache_valid_time }}"

  - name: Install Ubuntu kernel (trusty packages)
    apt:
      name:
        - linux-image-extra-{{ zoox_kernel_version }}
      cache_valid_time: "{{ apt_cache_valid_time }}"
    when: "os_release_name == 'trusty'"

  - name: Install Ubuntu kernel (focal packages)
    apt:
      name:
        - linux-modules-extra-{{ zoox_kernel_version }}
      cache_valid_time: "{{ apt_cache_valid_time }}"
    when: "os_release_name == 'focal'"
  become: yes
