---
- block:
  - name: Install Ubuntu Desktop
    apt:
      name: "{{ ubuntu_desktop_packages }}"
      install_recommends: no
      cache_valid_time: "{{ apt_cache_valid_time }}"
    async: 3600
    poll: 20

  - name: Pictures Directory
    file:
      path: /home/zoox/Pictures
      state: directory
      owner: zoox
      group: zoox

  - name: Purge unneeded packages
    apt:
      name: "{{ base_ubuntu_packages_to_remove }}"
      state: absent
      purge: yes

  - name: Remove getty configuration
    file:
      path: /etc/init/ttyS0.conf
      state: absent

  # So that ingest doesn't complain
  - name: Create /home/zoox/Desktop folder
    file:
      path: /home/zoox/Desktop
      state: directory
      owner: zoox
      group: zoox

  # This *must* come before xdma_driver, can_isotp, robotnik, or any other roles
  # that install debs that invoke this script.
  - name: Overwrite dkms common.postinst script
    copy:
      src: "trusty-dkms-common.postinst.sh"
      dest: /usr/lib/dkms/common.postinst
      owner: root
      group: root
      mode: '755'
    when: "os_release_name == 'trusty'"

  - name: Disable daily apt updates
    zoox_systemctl:
      name: "{{ item }}"
      enabled: no
      live: "{{ is_live_update }}"
    with_items:
      - apt-daily-upgrade.timer
      - apt-daily.timer
    when: "os_release_name == 'focal'"

  become: yes
