---
- hosts: all
  remote_user: root
  become: true
  tasks:
    - name: Install prerequisite packages for molecule testing on Debian or Ubuntu >= 18
      apt:
        update_cache: true
        name:
          - gpg
          - dirmngr
      when: (ansible_distribution == 'Ubuntu' and ansible_distribution_major_version | int >= 18) or ansible_distribution == 'Debian'
