---
docker_kernel_min_version: '0'

# TODO Remove the line below as soon as docker rpm are available for f32
fedora_distribution_package: "{{ '31' if (ansible_distribution_major_version | int) > 31 else ansible_distribution_major_version }}"

# https://docs.docker.com/install/linux/docker-ce/fedora/
# https://download.docker.com/linux/fedora/<fedora-version>/x86_64/stable/Packages/
docker_versioned_pkg:
  'latest': docker-ce
  '18.03': docker-ce-18.03.1.ce-3.fc{{ fedora_distribution_package }}
  '18.06': docker-ce-18.06.2.ce-3.fc{{ fedora_distribution_package }}
  '18.09': docker-ce-18.09.7-3.fc{{ fedora_distribution_package }}
  '19.03': docker-ce-19.03.12-3.fc{{ fedora_distribution_package }}
  'stable': docker-ce-19.03.12-3.fc{{ fedora_distribution_package }}
  'edge': docker-ce-19.03.12-3.fc{{ fedora_distribution_package }}

docker_cli_versioned_pkg:
  'latest': docker-ce-cli
  '18.09': docker-ce-cli-19.03.12-3.fc{{ fedora_distribution_package }}
  '19.03': docker-ce-cli-19.03.12-3.fc{{ fedora_distribution_package }}

docker_package_info:
  pkg_mgr: dnf
  pkgs:
    - name: "{{ containerd_versioned_pkg[containerd_version | string] }}"
    - name: "{{ docker_cli_versioned_pkg[docker_cli_version | string] }}"
    - name: "{{ docker_versioned_pkg[docker_version | string] }}"
