- name: Install flatpak
  become: yes
  apt:
    state: latest
    install_recommends: false
    name:
      - flatpak

- name: Add flathub remote to flatpak
  community.general.flatpak_remote:
    name: flathub
    state: present
    flatpakrepo_url: https://dl.flathub.org/repo/flathub.flatpakrepo
    method: user

- name: Install flatpaks
  community.general.flatpak:
    name: "{{ item }}"
    state: present
    method: user
  loop:
    - org.wezfurlong.wezterm
    - com.tomjwatson.Emote