Ansible playbook to install Thunderbird on Ubuntu via Snap

This will install the most recent version of Thunderbird from the Snap store. If Thunderbird is already installed, it will do nothing at all.

---
- name: Install Thunderbird
  hosts: all
  become: true
  tasks:
    - name: Ensure snapd is installed
      apt:
        name: snapd
        state: present
        update_cache: yes
      when: ansible_os_family == "Debian"

    - name: Install Thunderbird snap
      snap:
        name: thunderbird
        state: present
        classic: true

Use like this:

ansible-playbook -i thunderbird.yaml