From 99e501c36627208a953246c9e6efa73813a1eda0 Mon Sep 17 00:00:00 2001 From: "j.koehler" Date: Mon, 11 Jul 2022 16:27:37 +0200 Subject: [PATCH 1/2] #205 - install Docker packages explicitly following official Docker engine installation instructions --- README.md | 12 +++++++++--- defaults/main.yml | 8 ++++++-- tasks/main.yml | 12 ++++++------ 3 files changed, 21 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 8bf9e5f..8165019 100644 --- a/README.md +++ b/README.md @@ -14,10 +14,16 @@ Available variables are listed below, along with default values (see `defaults/m # Edition can be one of: 'ce' (Community Edition) or 'ee' (Enterprise Edition). docker_edition: 'ce' - docker_package: "docker-{{ docker_edition }}" - docker_package_state: present + docker_packages: + - "docker-{{ docker_edition }}" + - "docker-{{ docker_edition }}-cli" + - "docker-{{ docker_edition }}-rootless-extras" + docker_packages_state: present -The `docker_edition` should be either `ce` (Community Edition) or `ee` (Enterprise Edition). You can also specify a specific version of Docker to install using the distribution-specific format: Red Hat/CentOS: `docker-{{ docker_edition }}-`; Debian/Ubuntu: `docker-{{ docker_edition }}=`. +The `docker_edition` should be either `ce` (Community Edition) or `ee` (Enterprise Edition). +You can also specify a specific version of Docker to install using the distribution-specific format: +Red Hat/CentOS: `docker-{{ docker_edition }}-` (Note: you have to add this to all packages); +Debian/Ubuntu: `docker-{{ docker_edition }}=` (Note: you have to add this to all packages). You can control whether the package is installed, uninstalled, or at the latest version by setting `docker_package_state` to `present`, `absent`, or `latest`, respectively. Note that the Docker daemon will be automatically restarted if the Docker package is updated. This is a side effect of flushing all handlers (running any of the handlers that have been notified by this and any other role up to this point in the play). diff --git a/defaults/main.yml b/defaults/main.yml index 9e56e9a..f08e5b0 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,8 +1,12 @@ --- # Edition can be one of: 'ce' (Community Edition) or 'ee' (Enterprise Edition). docker_edition: 'ce' -docker_package: "docker-{{ docker_edition }}" -docker_package_state: present +docker_packages: + - "docker-{{ docker_edition }}" + - "docker-{{ docker_edition }}-cli" + - "docker-{{ docker_edition }}-rootless-extras" + - "containerd.io" +docker_packages_state: present # Service options. docker_service_state: started diff --git a/tasks/main.yml b/tasks/main.yml index 91fceef..f732880 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -5,18 +5,18 @@ - include_tasks: setup-Debian.yml when: ansible_os_family == 'Debian' -- name: Install Docker. +- name: Install Docker packages. package: - name: "{{ docker_package }}" - state: "{{ docker_package_state }}" + name: "{{ docker_packages }}" + state: "{{ docker_packages_state }}" notify: restart docker ignore_errors: "{{ ansible_check_mode }}" when: "ansible_version.full is version_compare('2.12', '<') or ansible_os_family not in ['RedHat', 'Debian']" -- name: Install Docker (with downgrade option). +- name: Install Docker packages (with downgrade option). package: - name: "{{ docker_package }}" - state: "{{ docker_package_state }}" + name: "{{ docker_packages }}" + state: "{{ docker_packages_state }}" allow_downgrade: true notify: restart docker ignore_errors: "{{ ansible_check_mode }}" From 279392701de38e8ecba39937d83edea15daa4d9b Mon Sep 17 00:00:00 2001 From: "j.koehler" Date: Thu, 14 Jul 2022 12:35:21 +0200 Subject: [PATCH 2/2] #205 - remove EoL Debian/Ubuntu versions, add Ubuntu 22.04 (jammy) - Docker no longer lists Debian 9 and Ubuntu 16.04 LTS under "OS requirements" and there are also no molecule tests for Ubuntu 16.04 - Added Ubuntu 22.04 LTS while on it --- .github/workflows/ci.yml | 2 +- meta/main.yml | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7df509a..e3cd228 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,11 +43,11 @@ jobs: distro: - rockylinux8 - centos7 + - ubuntu2204 - ubuntu2004 - ubuntu1804 - debian11 - debian10 - - debian9 - fedora34 steps: diff --git a/meta/main.yml b/meta/main.yml index 5f038a3..d9cd620 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -18,14 +18,13 @@ galaxy_info: - all - name: Debian versions: - - stretch - buster - bullseye - name: Ubuntu versions: - - xenial - bionic - focal + - jammy galaxy_tags: - web - system