Skip to content

Commit eb54cba

Browse files
committed
Release 5.0.0
1 parent 82cf131 commit eb54cba

30 files changed

+320
-427
lines changed

CHANGELOG.md

+18
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,24 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
77

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

10+
## [5.0.0](../../releases/tag/5.0.0) - 2023-05-20
11+
12+
### Changed
13+
14+
- Docker Compose V1 is EOL and this role will no longer support that in general.
15+
- Changed name of `docker_compose_no_pip` to `docker_compose_pip`, default set to `false`.
16+
- `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.
17+
18+
### Removed
19+
20+
- Removed variables `docker_compose_no_pip_detect_version` and `docker_compose_no_pip_version`
21+
- Removed Debian 8 bug tweaks.
22+
23+
### Internal
24+
25+
- Updated Vagrantfile for testing to works with AlmaLinux 9 as controller.
26+
- Investigate impact of Docker Compose V2 ([#147](../../issues/147))
27+
1028
## [4.0.0](../../releases/tag/4.0.0) - 2022-12-05
1129

1230
### Changed

DOCKER_CE_MATRIX.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Docker CE Support Matrix
22

3-
| # | 20.10 | 19.03 |
4-
|--------|--------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------|
5-
| CentOS | 7<br/>8 (stream)<br/>9 (stream) | 7 |
6-
| 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 |
7-
| Fedora | 34<br/>35<br/>36 | 30<br/>31 |
8-
| 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) |
9-
| RHEL | 7 on s390x (IBM Z)<br/>8 on s390x (IBM Z) | |
10-
| SLES | SLES 15-SP2 on s390x (IBM Z)<br/>SLES 15-SP3 on s390x (IBM Z) |
3+
| # | 23.0 | 20.10 |
4+
|--------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------|
5+
| CentOS | 7<br/>8 (stream)<br/>9 (stream) | 7<br/>8 (stream)<br/>9 (stream) |
6+
| 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) |
7+
| Fedora | 36<br/>37<br/>38 | 34<br/>35<br/>36 |
8+
| 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) |
9+
| 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) |
10+
| 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) | |

README.md

+31-25
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ different distributions.
2525
## Supported Distributions
2626

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

5050
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)
5151

52+
### Ansible Collection Requirements
53+
54+
If only ansible-core is installed these collections must also be installed for the role to work:
55+
56+
- ansible.posix
57+
- community.general
58+
5259
## Requirements
5360

5461
No additional requirements.
@@ -176,10 +183,9 @@ Note! All distributions listed in test matrix below does not provided the latest
176183
| Suite | ID | Comment |
177184
|-------|------------------------|--------------------------------------------------------------------------------------|
178185
| s-1 | t_config | |
179-
| s-2 | t_channel | Fail sometime since it might not be any nightly Docker CE build available |
180-
| s-3 | t_postinstall | |
181-
| s-4 | t_devicemapper_config | |
182-
| s-5 | t_auditd | |
186+
| s-2 | t_postinstall | |
187+
| s-3 | t_devicemapper_config | |
188+
| s-4 | t_auditd | |
183189

184190
### Test Matrix
185191

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

192-
| # | s-1 | s-2 | s-3 | s-4 | s-5 | updated |
193-
|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|
194-
| almalinux/8 | :heavy_check_mark: | :x: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | 2022-04-17 |
195-
| almalinux/9 | :heavy_check_mark: | :x: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | 2022-08-12 |
196-
| centos/7 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | 2022-04-17 |
197-
| centos/stream8 | :heavy_check_mark: | :x: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | 2022-04-17 |
198-
| generic/debian10 | :heavy_check_mark: | :heavy_check_mark: | :x: | :heavy_check_mark: | :heavy_check_mark: | 2022-04-17 |
199-
| generic/debian11 | :heavy_check_mark: | :x: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | 2022-04-17 |
200-
| generic/fedora34 | :heavy_check_mark: | :x: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | 2022-04-17 |
201-
| generic/fedora35 | :heavy_check_mark: | :x: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | 2022-04-17 |
202-
| generic/fedora36 | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: |
203-
| generic/rocky8 | :heavy_check_mark: | :x: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | 2022-04-17 |
204-
| generic/rocky9 | :heavy_check_mark: | :x: | :heavy_check_mark: | :x: | :heavy_check_mark: | 2022-08-12 |
205-
| generic/ubuntu1804 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | 2022-04-17 |
206-
| generic/ubuntu2004 | :heavy_check_mark: | :x: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | 2022-04-17 |
207-
| generic/ubuntu2204 | :heavy_check_mark: | :x: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | 2022-06-18 |
208-
| generic/rhel7 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | 2021-06-19 |
209-
| generic/rhel8 | :heavy_check_mark: | :x: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | 2021-06-19 |
210-
| generic/rhel9 | :heavy_check_mark: | :x: | :heavy_check_mark: | :x: | :heavy_check_mark: | 2022-08-12 |
198+
| # | s-1 | s-2 | s-3 | s-4 | updated |
199+
|--------------------|--------------------|--------------------|--------------------|--------------------|------------|
200+
| almalinux/8 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | 2023-05-18 |
201+
| almalinux/9 | :heavy_check_mark: | :heavy_check_mark: | :x: | :heavy_check_mark: | 2023-05-18 |
202+
| centos/7 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | 2023-05-18 |
203+
| centos/stream8 | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | 2023-05-18 |
204+
| centos/stream9 | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | 2023-05-18 |
205+
| generic/debian10 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | 2023-05-18 |
206+
| generic/debian11 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | 2023-05-18 |
207+
| generic/fedora36 | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | 2023-05-18 |
208+
| generic/fedora37 | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | 2023-05-18 |
209+
| generic/rocky8 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | 2023-05-18 |
210+
| generic/rocky9 | :heavy_check_mark: | :heavy_check_mark: | :x: | :heavy_check_mark: | 2023-05-18 |
211+
| generic/ubuntu1804 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | 2023-05-18 |
212+
| generic/ubuntu2004 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | 2023-05-18 |
213+
| generic/ubuntu2204 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | 2023-05-18 |
214+
| generic/rhel7 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | 2021-06-19 |
215+
| generic/rhel8 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | 2021-06-19 |
216+
| generic/rhel9 | :heavy_check_mark: | :heavy_check_mark: | :x: | :heavy_check_mark: | 2022-08-12 |
211217

212218
## License
213219

defaults/main.yml

+4-10
Original file line numberDiff line numberDiff line change
@@ -132,18 +132,12 @@ docker_do_checks: yes
132132
################################################################################
133133
# Ensures dependencies are installed so that most of the 'docker' Ansible modules will work.
134134
docker_sdk: false
135-
# Ensures dependencies are installed so that 'docker_service' Ansible module will work.
135+
# Ensures docker-compose is installed or available in common paths (docker-compose-plugin installed by default).
136136
docker_compose: false
137-
# Ensures that docker-compose is installed without pip, meaning 'docker_service' will NOT work.
137+
# NOT RECOMMENDED to set this to true unless really necessary - Python package not updated since 2021.
138+
# Ensures dependencies are installed so that 'docker_service' Ansible module will work.
138139
# Important! This only has any affect when 'docker_compose' is set to true.
139-
docker_compose_no_pip: false
140-
# Uses GitHub API to lookup latest version of docker compose
141-
# Important! GitHub API has a rate limit and if that is exceeded value from variable
142-
# docker_compose_no_pip_version will be used instead.
143-
docker_compose_no_pip_detect_version: true
144-
# Docker compose version to use if no automatic lookup is used
145-
# Available versions: https://github.com/docker/compose/releases
146-
docker_compose_no_pip_version: 1.29.2
140+
docker_compose_pip: false
147141
# Ensures dependencies are installed so that 'docker_stack' Ansible module will work.
148142
docker_stack: false
149143
# Additional PiP packages to install after Docker is configured and started.

meta/main.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ galaxy_info:
44
author: Bjorn Oscarsson
55
company: none
66
description: "Installs and configures Docker Community Edition (CE)"
7-
min_ansible_version: 5.0.0
7+
min_ansible_version: 2.12
88
license: MIT
99
platforms:
1010
- name: Fedora

tasks/bug-tweaks.yml

+1-9
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
11
- name: Configuration to avoid 'Device or resource busy' (CentOS/RedHat)
2-
ansible.builtin.include_tasks: bug-tweaks/bug-centos7-resource-busy.yml
32
when:
43
- _docker_os_dist == "CentOS" or _docker_os_dist == "RedHat"
54
- ansible_kernel is version_compare('4', '<')
6-
7-
- name: Best effort handling to directlvm for Debian 8 to get uniform behavior across distributions
8-
ansible.builtin.include_tasks: bug-tweaks/tweak-debian8-directlvm.yml
9-
when:
10-
- _docker_os_dist == "Debian"
11-
- _docker_os_dist_major_version | int == 8
12-
- docker_daemon_config['storage-opts'] is defined
13-
- docker_daemon_config['storage-opts'] | select('match', '^dm.directlvm_device.+')
5+
ansible.builtin.include_tasks: bug-tweaks/bug-centos7-resource-busy.yml

tasks/bug-tweaks/bug-centos7-resource-busy.yml

+11-11
Original file line numberDiff line numberDiff line change
@@ -5,34 +5,34 @@
55
check_mode: no
66

77
- name: Ensure fs.may_detach_mounts is set to avoid 'Device or resource busy' (CentOS/RedHat)
8+
when:
9+
- docker_enable_mount_flag_fix | bool
10+
- _may_detach_mounts.stat.exists
811
become: true
912
ansible.posix.sysctl:
1013
name: fs.may_detach_mounts
1114
value: "1"
1215
sysctl_file: /etc/sysctl.d/99-docker.conf
1316
reload: yes
14-
when:
15-
- docker_enable_mount_flag_fix | bool
16-
- _may_detach_mounts.stat.exists
1717

1818
- name: Stat /etc/sysctl.d/99-docker.conf (CentOS/RedHat)
19+
when:
20+
- not docker_enable_mount_flag_fix | bool
1921
ansible.builtin.stat:
2022
path: /etc/sysctl.d/99-docker.conf
2123
register: _sysctl_docker
2224
check_mode: no
23-
when:
24-
- not docker_enable_mount_flag_fix | bool
2525

2626
- name: Unset fs.may_detach_mounts (CentOS/RedHat)
27+
when:
28+
- not docker_enable_mount_flag_fix | bool
29+
- _sysctl_docker.stat.exists
2730
become: true
2831
ansible.posix.sysctl:
2932
name: fs.may_detach_mounts
3033
value: "0"
3134
sysctl_file: /etc/sysctl.d/99-docker.conf
3235
reload: yes
33-
when:
34-
- not docker_enable_mount_flag_fix | bool
35-
- _sysctl_docker.stat.exists
3636

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

4545
- name: Docker daemon restart is required
46+
when: _docker_old_mountflag_fix is changed
4647
ansible.builtin.set_fact:
4748
_docker_restart_required: true
48-
when: _docker_old_mountflag_fix is changed
4949

5050
- name: Set MountFlags option to "slave" to prevent "device busy" errors on CentOS/RedHat 7.3 kernels (CentOS/RedHat)
51+
when:
52+
- docker_enable_mount_flag_fix | bool
5153
ansible.builtin.set_fact:
5254
_docker_systemd_service_config_tweaks: "{{ _docker_systemd_service_config_tweaks + \
5355
_systemd_service_config_tweaks }}"
5456
vars:
5557
_systemd_service_config_tweaks:
5658
- 'MountFlags=slave'
57-
when:
58-
- docker_enable_mount_flag_fix | bool

tasks/bug-tweaks/lvm-thinpool.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
until: _pkg_result is succeeded
88

99
- name: Create LVM volume group
10+
when: pool.physical_volumes|default(None)
1011
become: true
1112
community.general.lvg:
1213
pvs: '{{ pool.physical_volumes }}'
1314
state: present
1415
vg: '{{ pool.volume_group }}'
15-
when: pool.physical_volumes|default(None)
1616

1717
- name: Check if data volume exists
1818
become: true
@@ -22,25 +22,26 @@
2222
register: _volume
2323

2424
- name: Create data volume
25+
when: not _volume.stat.exists
2526
become: true
2627
community.general.lvol:
2728
lv: '{{ pool.name }}'
2829
size: '{{ pool.data_size }}'
2930
vg: '{{ pool.volume_group }}'
3031
register: _datavolume_created
31-
when: not _volume.stat.exists
3232

3333
- name: Create meta data volume
34+
when: _datavolume_created is changed
3435
become: true
3536
community.general.lvol:
3637
lv: '{{ pool.name }}meta'
3738
size: '{{ pool.metadata_size }}'
3839
vg: '{{ pool.volume_group }}'
39-
when: _datavolume_created is changed
4040
tags:
4141
- skip_ansible_lint
4242

4343
- name: Convert data volume to thinpool
44+
when: _datavolume_created is changed
4445
become: true
4546
ansible.builtin.shell:
4647
lvconvert
@@ -49,6 +50,5 @@
4950
-c 512K
5051
--thinpool "{{ pool.volume_group }}/{{ pool.name }}"
5152
--poolmetadata "{{ pool.volume_group }}/{{ pool.name }}meta"
52-
when: _datavolume_created is changed
5353
tags:
5454
- skip_ansible_lint

tasks/bug-tweaks/tweak-debian8-directlvm.yml

-27
This file was deleted.

0 commit comments

Comments
 (0)