From ab7df10a7d8fdfe0a136f53f90adb9ecb31435f1 Mon Sep 17 00:00:00 2001 From: Alexander Block Date: Mon, 2 Jan 2017 17:01:54 +0100 Subject: [PATCH] Upgrade docker version and do some cleanups for unsupported distros/docker versions --- roles/docker/defaults/main.yml | 2 +- roles/docker/tasks/main.yml | 3 +-- roles/docker/vars/centos-6.yml | 16 ------------ roles/docker/vars/debian.yml | 4 +-- roles/docker/vars/fedora.yml | 2 -- roles/docker/vars/ubuntu-16.04.yml | 29 ---------------------- roles/docker/vars/ubuntu.yml | 9 +++---- roles/kubernetes/preinstall/tasks/main.yml | 6 ++--- 8 files changed, 9 insertions(+), 62 deletions(-) delete mode 100644 roles/docker/vars/centos-6.yml delete mode 100644 roles/docker/vars/ubuntu-16.04.yml diff --git a/roles/docker/defaults/main.yml b/roles/docker/defaults/main.yml index 70289582b..1685b0f69 100644 --- a/roles/docker/defaults/main.yml +++ b/roles/docker/defaults/main.yml @@ -1,4 +1,4 @@ -docker_version: '1.10' +docker_version: '1.12' docker_package_info: pkgs: diff --git a/roles/docker/tasks/main.yml b/roles/docker/tasks/main.yml index d3587e2d3..69243a612 100644 --- a/roles/docker/tasks/main.yml +++ b/roles/docker/tasks/main.yml @@ -48,8 +48,7 @@ copy: src: "rh_docker.repo" dest: "/etc/yum.repos.d/docker.repo" - when: ansible_distribution in ["CentOS","RedHat"] and - ansible_distribution_major_version >= 7 + when: ansible_distribution in ["CentOS","RedHat"] - name: ensure docker packages are installed action: "{{ docker_package_info.pkg_mgr }}" diff --git a/roles/docker/vars/centos-6.yml b/roles/docker/vars/centos-6.yml deleted file mode 100644 index 484063788..000000000 --- a/roles/docker/vars/centos-6.yml +++ /dev/null @@ -1,16 +0,0 @@ -docker_kernel_min_version: '2.6.32-431' - -# versioning: docker-io itself is pinned at docker 1.5 - -docker_package_info: - pkg_mgr: yum - pkgs: - - name: docker-io - -docker_repo_key_info: - pkg_key: '' - repo_keys: [] - -docker_repo_info: - pkg_repo: '' - repos: [] diff --git a/roles/docker/vars/debian.yml b/roles/docker/vars/debian.yml index f9bca1a22..5da66bfe5 100644 --- a/roles/docker/vars/debian.yml +++ b/roles/docker/vars/debian.yml @@ -1,10 +1,8 @@ -docker_kernel_min_version: '3.2' +docker_kernel_min_version: '3.10' # https://apt.dockerproject.org/repo/dists/debian-wheezy/main/filelist docker_versioned_pkg: 'latest': docker-engine - '1.9': docker-engine=1.9.1-0~{{ ansible_distribution_release|lower }} - '1.10': docker-engine=1.10.3-0~{{ ansible_distribution_release|lower }} '1.11': docker-engine=1.11.2-0~{{ ansible_distribution_release|lower }} '1.12': docker-engine=1.12.5-0~debian-{{ ansible_distribution_release|lower }} diff --git a/roles/docker/vars/fedora.yml b/roles/docker/vars/fedora.yml index 9fef0d37f..ce057cea0 100644 --- a/roles/docker/vars/fedora.yml +++ b/roles/docker/vars/fedora.yml @@ -2,8 +2,6 @@ docker_kernel_min_version: '0' docker_versioned_pkg: 'latest': docker - '1.9': docker-1:1.9.1 - '1.10': docker-1:1.10.1 '1.11': docker-1:1.11.2 '1.12': docker-1:1.12.5 diff --git a/roles/docker/vars/ubuntu-16.04.yml b/roles/docker/vars/ubuntu-16.04.yml deleted file mode 100644 index 21fb1927a..000000000 --- a/roles/docker/vars/ubuntu-16.04.yml +++ /dev/null @@ -1,29 +0,0 @@ ---- -docker_version: '1.11' -docker_kernel_min_version: '3.2' - -# https://apt.dockerproject.org/repo/dists/ubuntu-xenial/main/filelist -docker_versioned_pkg: - 'latest': docker-engine - '1.11': docker-engine=1.11.1-0~{{ ansible_distribution_release|lower }} - '1.12': docker-engine=1.12.5-0~ubuntu-{{ ansible_distribution_release|lower }} - -docker_package_info: - pkg_mgr: apt - pkgs: - - name: "{{ docker_versioned_pkg[docker_version | string] }}" - force: yes - -docker_repo_key_info: - pkg_key: apt_key - keyserver: hkp://p80.pool.sks-keyservers.net:80 - repo_keys: - - 58118E89F3A912897C070ADBF76221572C52609D - -docker_repo_info: - pkg_repo: apt_repository - repos: - - > - deb https://apt.dockerproject.org/repo - {{ ansible_distribution|lower }}-{{ ansible_distribution_release|lower }} - main diff --git a/roles/docker/vars/ubuntu.yml b/roles/docker/vars/ubuntu.yml index 2b258670a..35d301733 100644 --- a/roles/docker/vars/ubuntu.yml +++ b/roles/docker/vars/ubuntu.yml @@ -1,11 +1,10 @@ +--- +docker_version: '1.12' +docker_kernel_min_version: '3.10' -docker_kernel_min_version: '3.2' - -# https://apt.dockerproject.org/repo/dists/ubuntu-trusty/main/filelist +# https://apt.dockerproject.org/repo/dists/ubuntu-xenial/main/filelist docker_versioned_pkg: 'latest': docker-engine - '1.9': docker-engine=1.9.0-0~{{ ansible_distribution_release|lower }} - '1.10': docker-engine=1.10.3-0~{{ ansible_distribution_release|lower }} '1.11': docker-engine=1.11.1-0~{{ ansible_distribution_release|lower }} '1.12': docker-engine=1.12.5-0~ubuntu-{{ ansible_distribution_release|lower }} diff --git a/roles/kubernetes/preinstall/tasks/main.yml b/roles/kubernetes/preinstall/tasks/main.yml index aeaefc45d..761d497b0 100644 --- a/roles/kubernetes/preinstall/tasks/main.yml +++ b/roles/kubernetes/preinstall/tasks/main.yml @@ -117,8 +117,7 @@ - name: Install epel-release on RedHat/CentOS shell: rpm -qa | grep epel-release || rpm -ivh {{ epel_rpm_download_url }} - when: ansible_distribution in ["CentOS","RedHat"] and - ansible_distribution_major_version >= 7 + when: ansible_distribution in ["CentOS","RedHat"] changed_when: False tags: bootstrap-os @@ -182,7 +181,6 @@ - include: growpart-azure-centos-7.yml when: azure_check.stat.exists and - ansible_distribution in ["CentOS","RedHat"] and - ansible_distribution_major_version >= 7 + ansible_distribution in ["CentOS","RedHat"] tags: bootstrap-os