Skip to content

Commit

Permalink
Release 5.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
haxorof committed May 20, 2023
1 parent 82cf131 commit eb54cba
Show file tree
Hide file tree
Showing 30 changed files with 320 additions and 427 deletions.
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,24 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased](../../releases/tag/X.Y.Z)

## [5.0.0](../../releases/tag/5.0.0) - 2023-05-20

### Changed

- Docker Compose V1 is EOL and this role will no longer support that in general.
- Changed name of `docker_compose_no_pip` to `docker_compose_pip`, default set to `false`.
- `docker_compose` is `true` and `docker_compose_pip` is `false`, it will only create symbolic links (`docker-compose`) for backward compatibility. Docker compose CLI plugin is installed by default now.

### Removed

- Removed variables `docker_compose_no_pip_detect_version` and `docker_compose_no_pip_version`
- Removed Debian 8 bug tweaks.

### Internal

- Updated Vagrantfile for testing to works with AlmaLinux 9 as controller.
- Investigate impact of Docker Compose V2 ([#147](../../issues/147))

## [4.0.0](../../releases/tag/4.0.0) - 2022-12-05

### Changed
Expand Down
16 changes: 8 additions & 8 deletions DOCKER_CE_MATRIX.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Docker CE Support Matrix

| # | 20.10 | 19.03 |
|--------|--------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------|
| CentOS | 7<br/>8 (stream)<br/>9 (stream) | 7 |
| Debian | Bullseye 11 (testing)<br/>Buster 10 (stable)<br/>Raspbian Bullseye 11 (testing)<br/>Raspbian Buster 10 (stable) | Buster 10<br/>Stretch 9 (stable) / Raspbian Stretch |
| Fedora | 34<br/>35<br/>36 | 30<br/>31 |
| Ubuntu | Ubuntu Jammy 22.04 (LTS)<br/>Ubuntu Impish 21.10<br/>Ubuntu Hirsute 21.04<br/>Ubuntu Focal 20.04 (LTS)<br/>Ubuntu Bionic 18.04 (LTS) | Ubuntu Focal 20.04 (LTS)<br/>Ubuntu Eoan 19.10<br/>Ubuntu Bionic 18.04 (LTS)<br/>Ubuntu Xenial 16.04 (LTS) |
| RHEL | 7 on s390x (IBM Z)<br/>8 on s390x (IBM Z) | |
| SLES | SLES 15-SP2 on s390x (IBM Z)<br/>SLES 15-SP3 on s390x (IBM Z) |
| # | 23.0 | 20.10 |
|--------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------|
| CentOS | 7<br/>8 (stream)<br/>9 (stream) | 7<br/>8 (stream)<br/>9 (stream) |
| Debian | Bookworm 12 (testing)<br/>Bullseye 11 (stable)<br/>Buster 10 (oldstable)<br/>Raspbian Bookworm 12 (testing)<br/>Raspbian Bullseye 11 (stable)<br/>Raspbian Buster 10 (oldstable) | Bullseye 11 (testing)<br/>Buster 10 (stable)<br/>Raspbian Bullseye 11 (testing)<br/>Raspbian Buster 10 (stable) |
| Fedora | 36<br/>37<br/>38 | 34<br/>35<br/>36 |
| Ubuntu | Ubuntu Lunar 23.04<br/>Ubuntu Kinetic 22.10<br/>Ubuntu Jammy 22.04 (LTS)<br/>Ubuntu Focal 20.04 (LTS)<br/>Ubuntu Bionic 18.04 (LTS) | Ubuntu Jammy 22.04 (LTS)<br/>Ubuntu Impish 21.10<br/>Ubuntu Hirsute 21.04<br/>Ubuntu Focal 20.04 (LTS)<br/>Ubuntu Bionic 18.04 (LTS) |
| RHEL | 7 on s390x (IBM Z)<br/>8 on s390x (IBM Z)<br/>9 on s390x (IBM Z) | 7 on s390x (IBM Z)<br/>8 on s390x (IBM Z) |
| SLES | SLES 15-SP3 on s390x (IBM Z)<br/>SLES 15-SP4 on s390x (IBM Z) | SLES 15-SP2 on s390x (IBM Z)<br/>SLES 15-SP3 on s390x (IBM Z) | |
56 changes: 31 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ different distributions.
## Supported Distributions

- AlmaLinux
- CentOS
- CentOS Stream<sup>1</sup>
- CentOS
- CentOS Stream
- Debian
- Fedora
- Linux Mint<sup>1</sup> (based on Ubuntu).
Expand All @@ -49,6 +49,13 @@ For this role to support multiple Ansible versions it is not possible to avoid a

This role tries to support the latest and previous major release of Ansible version. For supported Ansible versions see [here](https://docs.ansible.com/ansible/devel/reference_appendices/release_and_maintenance.html)

### Ansible Collection Requirements

If only ansible-core is installed these collections must also be installed for the role to work:

- ansible.posix
- community.general

## Requirements

No additional requirements.
Expand Down Expand Up @@ -176,10 +183,9 @@ Note! All distributions listed in test matrix below does not provided the latest
| Suite | ID | Comment |
|-------|------------------------|--------------------------------------------------------------------------------------|
| s-1 | t_config | |
| s-2 | t_channel | Fail sometime since it might not be any nightly Docker CE build available |
| s-3 | t_postinstall | |
| s-4 | t_devicemapper_config | |
| s-5 | t_auditd | |
| s-2 | t_postinstall | |
| s-3 | t_devicemapper_config | |
| s-4 | t_auditd | |

### Test Matrix

Expand All @@ -189,25 +195,25 @@ Note! All distributions listed in test matrix below does not provided the latest
| :x: | At least one test failed |
| :heavy_minus_sign: | No test done / Not yet tested |

| # | s-1 | s-2 | s-3 | s-4 | s-5 | updated |
|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|
| almalinux/8 | :heavy_check_mark: | :x: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | 2022-04-17 |
| almalinux/9 | :heavy_check_mark: | :x: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | 2022-08-12 |
| centos/7 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | 2022-04-17 |
| centos/stream8 | :heavy_check_mark: | :x: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | 2022-04-17 |
| generic/debian10 | :heavy_check_mark: | :heavy_check_mark: | :x: | :heavy_check_mark: | :heavy_check_mark: | 2022-04-17 |
| generic/debian11 | :heavy_check_mark: | :x: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | 2022-04-17 |
| generic/fedora34 | :heavy_check_mark: | :x: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | 2022-04-17 |
| generic/fedora35 | :heavy_check_mark: | :x: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | 2022-04-17 |
| generic/fedora36 | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: |
| generic/rocky8 | :heavy_check_mark: | :x: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | 2022-04-17 |
| generic/rocky9 | :heavy_check_mark: | :x: | :heavy_check_mark: | :x: | :heavy_check_mark: | 2022-08-12 |
| generic/ubuntu1804 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | 2022-04-17 |
| generic/ubuntu2004 | :heavy_check_mark: | :x: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | 2022-04-17 |
| generic/ubuntu2204 | :heavy_check_mark: | :x: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | 2022-06-18 |
| generic/rhel7 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | 2021-06-19 |
| generic/rhel8 | :heavy_check_mark: | :x: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | 2021-06-19 |
| generic/rhel9 | :heavy_check_mark: | :x: | :heavy_check_mark: | :x: | :heavy_check_mark: | 2022-08-12 |
| # | s-1 | s-2 | s-3 | s-4 | updated |
|--------------------|--------------------|--------------------|--------------------|--------------------|------------|
| almalinux/8 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | 2023-05-18 |
| almalinux/9 | :heavy_check_mark: | :heavy_check_mark: | :x: | :heavy_check_mark: | 2023-05-18 |
| centos/7 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | 2023-05-18 |
| centos/stream8 | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | 2023-05-18 |
| centos/stream9 | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | 2023-05-18 |
| generic/debian10 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | 2023-05-18 |
| generic/debian11 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | 2023-05-18 |
| generic/fedora36 | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | 2023-05-18 |
| generic/fedora37 | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | 2023-05-18 |
| generic/rocky8 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | 2023-05-18 |
| generic/rocky9 | :heavy_check_mark: | :heavy_check_mark: | :x: | :heavy_check_mark: | 2023-05-18 |
| generic/ubuntu1804 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | 2023-05-18 |
| generic/ubuntu2004 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | 2023-05-18 |
| generic/ubuntu2204 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | 2023-05-18 |
| generic/rhel7 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | 2021-06-19 |
| generic/rhel8 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | 2021-06-19 |
| generic/rhel9 | :heavy_check_mark: | :heavy_check_mark: | :x: | :heavy_check_mark: | 2022-08-12 |

## License

Expand Down
14 changes: 4 additions & 10 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,18 +132,12 @@ docker_do_checks: yes
################################################################################
# Ensures dependencies are installed so that most of the 'docker' Ansible modules will work.
docker_sdk: false
# Ensures dependencies are installed so that 'docker_service' Ansible module will work.
# Ensures docker-compose is installed or available in common paths (docker-compose-plugin installed by default).
docker_compose: false
# Ensures that docker-compose is installed without pip, meaning 'docker_service' will NOT work.
# NOT RECOMMENDED to set this to true unless really necessary - Python package not updated since 2021.
# Ensures dependencies are installed so that 'docker_service' Ansible module will work.
# Important! This only has any affect when 'docker_compose' is set to true.
docker_compose_no_pip: false
# Uses GitHub API to lookup latest version of docker compose
# Important! GitHub API has a rate limit and if that is exceeded value from variable
# docker_compose_no_pip_version will be used instead.
docker_compose_no_pip_detect_version: true
# Docker compose version to use if no automatic lookup is used
# Available versions: https://github.com/docker/compose/releases
docker_compose_no_pip_version: 1.29.2
docker_compose_pip: false
# Ensures dependencies are installed so that 'docker_stack' Ansible module will work.
docker_stack: false
# Additional PiP packages to install after Docker is configured and started.
Expand Down
2 changes: 1 addition & 1 deletion meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ galaxy_info:
author: Bjorn Oscarsson
company: none
description: "Installs and configures Docker Community Edition (CE)"
min_ansible_version: 5.0.0
min_ansible_version: 2.12
license: MIT
platforms:
- name: Fedora
Expand Down
10 changes: 1 addition & 9 deletions tasks/bug-tweaks.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
- name: Configuration to avoid 'Device or resource busy' (CentOS/RedHat)
ansible.builtin.include_tasks: bug-tweaks/bug-centos7-resource-busy.yml
when:
- _docker_os_dist == "CentOS" or _docker_os_dist == "RedHat"
- ansible_kernel is version_compare('4', '<')

- name: Best effort handling to directlvm for Debian 8 to get uniform behavior across distributions
ansible.builtin.include_tasks: bug-tweaks/tweak-debian8-directlvm.yml
when:
- _docker_os_dist == "Debian"
- _docker_os_dist_major_version | int == 8
- docker_daemon_config['storage-opts'] is defined
- docker_daemon_config['storage-opts'] | select('match', '^dm.directlvm_device.+')
ansible.builtin.include_tasks: bug-tweaks/bug-centos7-resource-busy.yml
22 changes: 11 additions & 11 deletions tasks/bug-tweaks/bug-centos7-resource-busy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,34 @@
check_mode: no

- name: Ensure fs.may_detach_mounts is set to avoid 'Device or resource busy' (CentOS/RedHat)
when:
- docker_enable_mount_flag_fix | bool
- _may_detach_mounts.stat.exists
become: true
ansible.posix.sysctl:
name: fs.may_detach_mounts
value: "1"
sysctl_file: /etc/sysctl.d/99-docker.conf
reload: yes
when:
- docker_enable_mount_flag_fix | bool
- _may_detach_mounts.stat.exists

- name: Stat /etc/sysctl.d/99-docker.conf (CentOS/RedHat)
when:
- not docker_enable_mount_flag_fix | bool
ansible.builtin.stat:
path: /etc/sysctl.d/99-docker.conf
register: _sysctl_docker
check_mode: no
when:
- not docker_enable_mount_flag_fix | bool

- name: Unset fs.may_detach_mounts (CentOS/RedHat)
when:
- not docker_enable_mount_flag_fix | bool
- _sysctl_docker.stat.exists
become: true
ansible.posix.sysctl:
name: fs.may_detach_mounts
value: "0"
sysctl_file: /etc/sysctl.d/99-docker.conf
reload: yes
when:
- not docker_enable_mount_flag_fix | bool
- _sysctl_docker.stat.exists

# Keep for compatibility reasons of this role. Now everything is in the same file.
- name: Remove systemd drop-in for Docker Mount Flags slave configuration (CentOS/RedHat)
Expand All @@ -43,16 +43,16 @@
register: _docker_old_mountflag_fix

- name: Docker daemon restart is required
when: _docker_old_mountflag_fix is changed
ansible.builtin.set_fact:
_docker_restart_required: true
when: _docker_old_mountflag_fix is changed

- name: Set MountFlags option to "slave" to prevent "device busy" errors on CentOS/RedHat 7.3 kernels (CentOS/RedHat)
when:
- docker_enable_mount_flag_fix | bool
ansible.builtin.set_fact:
_docker_systemd_service_config_tweaks: "{{ _docker_systemd_service_config_tweaks + \
_systemd_service_config_tweaks }}"
vars:
_systemd_service_config_tweaks:
- 'MountFlags=slave'
when:
- docker_enable_mount_flag_fix | bool
8 changes: 4 additions & 4 deletions tasks/bug-tweaks/lvm-thinpool.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
until: _pkg_result is succeeded

- name: Create LVM volume group
when: pool.physical_volumes|default(None)
become: true
community.general.lvg:
pvs: '{{ pool.physical_volumes }}'
state: present
vg: '{{ pool.volume_group }}'
when: pool.physical_volumes|default(None)

- name: Check if data volume exists
become: true
Expand All @@ -22,25 +22,26 @@
register: _volume

- name: Create data volume
when: not _volume.stat.exists
become: true
community.general.lvol:
lv: '{{ pool.name }}'
size: '{{ pool.data_size }}'
vg: '{{ pool.volume_group }}'
register: _datavolume_created
when: not _volume.stat.exists

- name: Create meta data volume
when: _datavolume_created is changed
become: true
community.general.lvol:
lv: '{{ pool.name }}meta'
size: '{{ pool.metadata_size }}'
vg: '{{ pool.volume_group }}'
when: _datavolume_created is changed
tags:
- skip_ansible_lint

- name: Convert data volume to thinpool
when: _datavolume_created is changed
become: true
ansible.builtin.shell:
lvconvert
Expand All @@ -49,6 +50,5 @@
-c 512K
--thinpool "{{ pool.volume_group }}/{{ pool.name }}"
--poolmetadata "{{ pool.volume_group }}/{{ pool.name }}meta"
when: _datavolume_created is changed
tags:
- skip_ansible_lint
27 changes: 0 additions & 27 deletions tasks/bug-tweaks/tweak-debian8-directlvm.yml

This file was deleted.

Loading

0 comments on commit eb54cba

Please sign in to comment.