---
# containerd package info is only relevant for docker
containerd_versioned_pkg:
  'latest': "{{ containerd_package }}"
  '1.3.7': "{{ containerd_package }}=1.3.7-1"
  '1.3.9': "{{ containerd_package }}=1.3.9-1"
  '1.4.3': "{{ containerd_package }}=1.4.3-2"
  '1.4.4': "{{ containerd_package }}=1.4.4-1"
  '1.4.6': "{{ containerd_package }}=1.4.6-1"
  '1.4.9': "{{ containerd_package }}=1.4.9-1"
  '1.4.12': "{{ containerd_package }}=1.4.12-1"
  '1.6.4': "{{ containerd_package }}=1.6.4-1"
  '1.6.6': "{{ containerd_package }}=1.6.6-1"
  '1.6.7': "{{ containerd_package }}=1.6.7-1"
  '1.6.8': "{{ containerd_package }}=1.6.8-1"
  '1.6.9': "{{ containerd_package }}=1.6.9-1"
  '1.6.10': "{{ containerd_package }}=1.6.10-1"
  '1.6.11': "{{ containerd_package }}=1.6.11-1"
  '1.6.12': "{{ containerd_package }}=1.6.12-1"
  '1.6.13': "{{ containerd_package }}=1.6.13-1"
  '1.6.14': "{{ containerd_package }}=1.6.14-1"
  '1.6.15': "{{ containerd_package }}=1.6.15-1"
  '1.6.16': "{{ containerd_package }}=1.6.16-1"
  '1.6.18': "{{ containerd_package }}=1.6.18-1"
  '1.6.28': "{{ containerd_package }}=1.6.28-2"
  '1.6.31': "{{ containerd_package }}=1.6.31-1"
  '1.6.32': "{{ containerd_package }}=1.6.32-1"
  '1.6.33': "{{ containerd_package }}=1.6.33-1"
  '1.7.18': "{{ containerd_package }}=1.7.18-1"
  '1.7.19': "{{ containerd_package }}=1.7.19-1"
  '1.7.20': "{{ containerd_package }}=1.7.20-1"
  '1.7.21': "{{ containerd_package }}=1.7.21-1"
  '1.7.22': "{{ containerd_package }}=1.7.22-1"
  '1.7.23': "{{ containerd_package }}=1.7.23-1"
  '1.7.24': "{{ containerd_package }}=1.7.24-1"
  '1.7.25': "{{ containerd_package }}=1.7.25-1"
  '1.7.26': "{{ containerd_package }}=1.7.26-1"
  '1.7.27': "{{ containerd_package }}=1.7.27-1"
  'stable': "{{ containerd_package }}=1.7.27-1"
  'edge': "{{ containerd_package }}=1.7.27-1"

# https://download.docker.com/linux/debian/
docker_versioned_pkg:
  'latest': docker-ce
  '18.09': docker-ce=5:18.09.9~3-0~debian-{{ ansible_distribution_release | lower }}
  '19.03': docker-ce=5:19.03.15~3-0~debian-{{ ansible_distribution_release | lower }}
  '20.10': docker-ce=5:20.10.20~3-0~debian-{{ ansible_distribution_release | lower }}
  '23.0': docker-ce=5:23.0.6-1~debian.{{ ansible_distribution_major_version }}~{{ ansible_distribution_release | lower }}
  '24.0': docker-ce=5:24.0.9-1~debian.{{ ansible_distribution_major_version }}~{{ ansible_distribution_release | lower }}
  '25.0': docker-ce=5:25.0.5-1~debian.{{ ansible_distribution_major_version }}~{{ ansible_distribution_release | lower }}
  '26.0': docker-ce=5:26.0.2-1~debian.{{ ansible_distribution_major_version }}~{{ ansible_distribution_release | lower }}
  '26.1': docker-ce=5:26.1.4-1~debian.{{ ansible_distribution_major_version }}~{{ ansible_distribution_release | lower }}
  '27.0': docker-ce=5:27.0.3-1~debian.{{ ansible_distribution_major_version }}~{{ ansible_distribution_release | lower }}
  '27.1': docker-ce=5:27.1.2-1~debian.{{ ansible_distribution_major_version }}~{{ ansible_distribution_release | lower }}
  '27.2': docker-ce=5:27.2.1-1~debian.{{ ansible_distribution_major_version }}~{{ ansible_distribution_release | lower }}
  '27.3': docker-ce=5:27.3.1-1~debian.{{ ansible_distribution_major_version }}~{{ ansible_distribution_release | lower }}
  '27.4': docker-ce=5:27.4.1-1~debian.{{ ansible_distribution_major_version }}~{{ ansible_distribution_release | lower }}
  '27.5': docker-ce=5:27.5.1-1~debian.{{ ansible_distribution_major_version }}~{{ ansible_distribution_release | lower }}
  '28.0': docker-ce=5:28.0.4-1~debian.{{ ansible_distribution_major_version }}~{{ ansible_distribution_release | lower }}
  '28.1': docker-ce=5:28.1.1-1~debian.{{ ansible_distribution_major_version }}~{{ ansible_distribution_release | lower }}
  '28.2': docker-ce=5:28.2.2-1~debian.{{ ansible_distribution_major_version }}~{{ ansible_distribution_release | lower }}
  '28.3': docker-ce=5:28.3.3-1~debian.{{ ansible_distribution_major_version }}~{{ ansible_distribution_release | lower }}
  'stable': docker-ce=5:28.3.3-1~debian.{{ ansible_distribution_major_version }}~{{ ansible_distribution_release | lower }}
  'edge': docker-ce=5:28.3.3-1~debian.{{ ansible_distribution_major_version }}~{{ ansible_distribution_release | lower }}

docker_cli_versioned_pkg:
  'latest': docker-ce-cli
  '18.09': docker-ce-cli=5:18.09.9~3-0~debian-{{ ansible_distribution_release | lower }}
  '19.03': docker-ce-cli=5:19.03.15~3-0~debian-{{ ansible_distribution_release | lower }}
  '20.10': docker-ce-cli=5:20.10.20~3-0~debian-{{ ansible_distribution_release | lower }}
  '23.0': docker-ce-cli=5:23.0.6-1~debian.{{ ansible_distribution_major_version }}~{{ ansible_distribution_release | lower }}
  '24.0': docker-ce-cli=5:24.0.9-1~debian.{{ ansible_distribution_major_version }}~{{ ansible_distribution_release | lower }}
  '25.0': docker-ce-cli=5:25.0.5-1~debian.{{ ansible_distribution_major_version }}~{{ ansible_distribution_release | lower }}
  '26.0': docker-ce-cli=5:26.0.2-1~debian.{{ ansible_distribution_major_version }}~{{ ansible_distribution_release | lower }}
  '26.1': docker-ce-cli=5:26.1.4-1~debian.{{ ansible_distribution_major_version }}~{{ ansible_distribution_release | lower }}
  '27.0': docker-ce-cli=5:27.0.3-1~debian.{{ ansible_distribution_major_version }}~{{ ansible_distribution_release | lower }}
  '27.1': docker-ce-cli=5:27.1.2-1~debian.{{ ansible_distribution_major_version }}~{{ ansible_distribution_release | lower }}
  '27.2': docker-ce-cli=5:27.2.1-1~debian.{{ ansible_distribution_major_version }}~{{ ansible_distribution_release | lower }}
  '27.3': docker-ce-cli=5:27.3.1-1~debian.{{ ansible_distribution_major_version }}~{{ ansible_distribution_release | lower }}
  '27.4': docker-ce-cli=5:27.4.1-1~debian.{{ ansible_distribution_major_version }}~{{ ansible_distribution_release | lower }}
  '27.5': docker-ce-cli=5:27.5.1-1~debian.{{ ansible_distribution_major_version }}~{{ ansible_distribution_release | lower }}
  '28.0': docker-ce-cli=5:28.0.4-1~debian.{{ ansible_distribution_major_version }}~{{ ansible_distribution_release | lower }}
  '28.1': docker-ce-cli=5:28.1.1-1~debian.{{ ansible_distribution_major_version }}~{{ ansible_distribution_release | lower }}
  '28.2': docker-ce-cli=5:28.2.2-1~debian.{{ ansible_distribution_major_version }}~{{ ansible_distribution_release | lower }}
  '28.3': docker-ce-cli=5:28.3.3-1~debian.{{ ansible_distribution_major_version }}~{{ ansible_distribution_release | lower }}
  'stable': docker-ce-cli=5:28.3.3-1~debian.{{ ansible_distribution_major_version }}~{{ ansible_distribution_release | lower }}
  'edge': docker-ce-cli=5:28.3.3-1~debian.{{ ansible_distribution_major_version }}~{{ ansible_distribution_release | lower }}

docker_package_info:
  pkgs:
    - "{{ containerd_versioned_pkg[docker_containerd_version | string] }}"
    - "{{ docker_cli_versioned_pkg[docker_cli_version | string] }}"
    - "{{ docker_versioned_pkg[docker_version | string] }}"

docker_repo_key_info:
  url: '{{ docker_debian_repo_gpgkey }}'
  repo_keys:
    - '{{ docker_debian_repo_repokey }}'

docker_repo_info:
  repos:
    - >
      deb {{ docker_debian_repo_base_url }}
      {{ ansible_distribution_release | lower }}
      stable
