---
- name: Add Gopass archive keyring
  apt_key:
    url: https://packages.gopass.pw/repos/gopass/gopass-archive-keyring.gpg
    state: present
    keyring: /usr/share/keyrings/gopass-archive-keyring.gpg

- name: Add Gopass sources list
  copy:
    dest: /etc/apt/sources.list.d/gopass.sources
    content: |
      Types: deb
      URIs: https://packages.gopass.pw/repos/gopass
      Suites: stable
      Architectures: all amd64 arm64 armhf
      Components: main
      Signed-By: /usr/share/keyrings/gopass-archive-keyring.gpg
    owner: root
    group: root
    mode: '0644'

- name: Install Gopass and archive keyring
  apt:
    update_cache: yes
    name: 
      - gopass
      - gopass-archive-keyring
    state: present

