
  - name: Allow release-info to change for APT repositories
    command: apt-get update -y --allow-releaseinfo-change
    when: (ansible_distribution == "Debian" and ansible_distribution_major_version|int > 9) or
          (ansible_distribution == "Ubuntu" and ansible_distribution_major_version|int > 18)

  - name: Install gpg using apt
    apt: name=gpg state=present
    when: ansible_distribution == "Debian" and ansible_distribution_major_version|int >= 10

  - name: Install gpg-agent using apt
    apt: name=gpg-agent state=present
    when: ansible_distribution == "Debian" and ansible_distribution_major_version|int >= 11

  - name: Install lsb-release using apt
    apt: name=lsb-release state=present
    when: ansible_distribution == "Debian" or ansible_distribution == "Ubuntu"

