---
- name: "add backports repo"
  apt_repository:
    repo: "deb http://cdn-fastly.deb.debian.org/debian {{ansible_distribution_release}}-backports main"
    update_cache: false

- name: "add pgdg repo"
  apt_repository:
    repo: "deb http://apt.postgresql.org/pub/repos/apt/ {{ansible_distribution_release}}-pgdg main"
    update_cache: false
  when: ansible_architecture in ["i386", "x86_64"]

- name: "remove defunct repositories"
  apt_repository:
    state: absent
    repo: "deb http://mozilla.debian.net/ {{ansible_distribution_release}}-backports firefox-release"
    update_cache: false
