Match docker-cli version with docker-engine version (when available) (#6163)

This commit is contained in:
Florian Ruynat 2020-05-25 14:37:11 +02:00 committed by GitHub
parent d036a04d4d
commit e9ce7243b8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 40 additions and 4 deletions

View file

@ -173,7 +173,7 @@ packet_fedora30-cilium-containerd:
packet_centos7-weave-upgrade-ha: packet_centos7-weave-upgrade-ha:
stage: deploy-part3 stage: deploy-part3
extends: .packet extends: .packet
when: on_success when: manual
variables: variables:
UPGRADE_TEST: basic UPGRADE_TEST: basic
MITOGEN_ENABLE: "false" MITOGEN_ENABLE: "false"
@ -181,7 +181,7 @@ packet_centos7-weave-upgrade-ha:
packet_debian9-calico-upgrade: packet_debian9-calico-upgrade:
stage: deploy-part3 stage: deploy-part3
extends: .packet extends: .packet
when: on_success when: manual
variables: variables:
UPGRADE_TEST: graceful UPGRADE_TEST: graceful
MITOGEN_ENABLE: "false" MITOGEN_ENABLE: "false"
@ -189,7 +189,7 @@ packet_debian9-calico-upgrade:
packet_debian9-calico-upgrade-once: packet_debian9-calico-upgrade-once:
stage: deploy-part3 stage: deploy-part3
extends: .packet extends: .packet
when: on_success when: manual
variables: variables:
UPGRADE_TEST: graceful UPGRADE_TEST: graceful
MITOGEN_ENABLE: "false" MITOGEN_ENABLE: "false"

View file

@ -1,5 +1,6 @@
--- ---
docker_version: '18.09' docker_version: '18.09'
docker_cli_version: "{{ 'latest' if docker_version != 'latest' and docker_version is version('18.09', '<') else docker_version }}"
docker_selinux_version: '17.03' docker_selinux_version: '17.03'
docker_package_info: docker_package_info:

View file

@ -16,9 +16,16 @@ docker_versioned_pkg:
'stable': docker-ce=5:18.09.7~3-0~debian-{{ ansible_distribution_release|lower }} 'stable': docker-ce=5:18.09.7~3-0~debian-{{ ansible_distribution_release|lower }}
'edge': docker-ce=5:19.03.7~3-0~debian-{{ ansible_distribution_release|lower }} 'edge': docker-ce=5:19.03.7~3-0~debian-{{ 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.9~3-0~debian-{{ ansible_distribution_release|lower }}
docker_package_info: docker_package_info:
pkg_mgr: apt pkg_mgr: apt
pkgs: pkgs:
- name: "{{ docker_cli_versioned_pkg[docker_cli_version | string] }}"
force: yes
- name: "{{ docker_versioned_pkg[docker_version | string] }}" - name: "{{ docker_versioned_pkg[docker_version | string] }}"
force: yes force: yes

View file

@ -11,10 +11,17 @@ docker_versioned_pkg:
'18.09': docker-ce-18.09.7-3.fc{{ ansible_distribution_major_version }} '18.09': docker-ce-18.09.7-3.fc{{ ansible_distribution_major_version }}
'19.03': docker-ce-19.03.8-3.fc{{ ansible_distribution_major_version }} '19.03': docker-ce-19.03.8-3.fc{{ ansible_distribution_major_version }}
docker_cli_versioned_pkg:
'latest': docker-ce-cli
'18.09': docker-ce-cli-19.03.8-3.fc{{ ansible_distribution_major_version }}
'19.03': docker-ce-cli-19.03.9-3.fc{{ ansible_distribution_major_version }}
# Fedora 30/31 don't provide packages for docker 18.0x ... # Fedora 30/31 don't provide packages for docker 18.0x ...
docker_version: "19.03" docker_version: "19.03"
docker_cli_version: "19.03"
docker_package_info: docker_package_info:
pkg_mgr: dnf pkg_mgr: dnf
pkgs: pkgs:
- name: "{{ docker_cli_versioned_pkg[docker_cli_version | string] }}"
- name: "{{ docker_versioned_pkg[docker_version | string] }}" - name: "{{ docker_versioned_pkg[docker_version | string] }}"

View file

@ -16,6 +16,11 @@ docker_versioned_pkg:
'stable': docker-ce-18.09.9-3.el7 'stable': docker-ce-18.09.9-3.el7
'edge': docker-ce-19.03.8-3.el7 'edge': docker-ce-19.03.8-3.el7
docker_cli_versioned_pkg:
'latest': docker-ce-cli
'18.09': docker-ce-cli-18.09.9-3.el7
'19.03': docker-ce-cli-19.03.9-3.el7
docker_selinux_versioned_pkg: docker_selinux_versioned_pkg:
'latest': docker-ce-selinux-17.03.3.ce-1.el7 'latest': docker-ce-selinux-17.03.3.ce-1.el7
'17.03': docker-ce-selinux-17.03.3.ce-1.el7 '17.03': docker-ce-selinux-17.03.3.ce-1.el7
@ -30,13 +35,15 @@ docker_pkgs_use_docker_ce:
yum_conf: "{{ docker_yum_conf }}" yum_conf: "{{ docker_yum_conf }}"
docker_pkgs: docker_pkgs:
- name: "{{ docker_cli_versioned_pkg[docker_cli_version | string] }}"
yum_conf: "{{ docker_yum_conf }}"
- name: "{{ docker_versioned_pkg[docker_version | string] }}" - name: "{{ docker_versioned_pkg[docker_version | string] }}"
yum_conf: "{{ docker_yum_conf }}" yum_conf: "{{ docker_yum_conf }}"
docker_package_info: docker_package_info:
pkg_mgr: yum pkg_mgr: yum
pkgs: |- pkgs: |-
{%- if docker_version is version('17.04', '<') -%} {%- if docker_version != "latest" and docker_version is version('17.04', '<') -%}
{{ docker_pkgs_use_docker_ce }} {{ docker_pkgs_use_docker_ce }}
{%- else -%} {%- else -%}
{{ docker_pkgs }} {{ docker_pkgs }}

View file

@ -16,9 +16,16 @@ docker_versioned_pkg:
'stable': docker-ce=5:18.09.7~3-0~ubuntu-{{ ansible_distribution_release|lower }} 'stable': docker-ce=5:18.09.7~3-0~ubuntu-{{ ansible_distribution_release|lower }}
'edge': docker-ce=5:19.03.7~3-0~ubuntu-{{ ansible_distribution_release|lower }} 'edge': docker-ce=5:19.03.7~3-0~ubuntu-{{ ansible_distribution_release|lower }}
docker_cli_versioned_pkg:
'latest': docker-ce-cli
'18.09': docker-ce-cli=5:18.09.9~3-0~ubuntu-{{ ansible_distribution_release|lower }}
'19.03': docker-ce-cli=5:19.03.9~3-0~ubuntu-{{ ansible_distribution_release|lower }}
docker_package_info: docker_package_info:
pkg_mgr: apt pkg_mgr: apt
pkgs: pkgs:
- name: "{{ docker_cli_versioned_pkg[docker_cli_version | string] }}"
force: yes
- name: "{{ docker_versioned_pkg[docker_version | string] }}" - name: "{{ docker_versioned_pkg[docker_version | string] }}"
force: yes force: yes

View file

@ -12,9 +12,16 @@ docker_versioned_pkg:
'stable': docker-ce=5:18.09.7~3-0~ubuntu-{{ ansible_distribution_release|lower }} 'stable': docker-ce=5:18.09.7~3-0~ubuntu-{{ ansible_distribution_release|lower }}
'edge': docker-ce=5:19.03.7~3-0~ubuntu-{{ ansible_distribution_release|lower }} 'edge': docker-ce=5:19.03.7~3-0~ubuntu-{{ ansible_distribution_release|lower }}
docker_cli_versioned_pkg:
'latest': docker-ce-cli
'18.09': docker-ce-cli=5:18.09.9~3-0~ubuntu-{{ ansible_distribution_release|lower }}
'19.03': docker-ce-cli=5:19.03.9~3-0~ubuntu-{{ ansible_distribution_release|lower }}
docker_package_info: docker_package_info:
pkg_mgr: apt pkg_mgr: apt
pkgs: pkgs:
- name: "{{ docker_cli_versioned_pkg[docker_cli_version | string] }}"
force: yes
- name: "{{ docker_versioned_pkg[docker_version | string] }}" - name: "{{ docker_versioned_pkg[docker_version | string] }}"
force: yes force: yes