mirror of
https://github.com/ansible-collections/community.docker.git
synced 2026-07-29 11:55:04 +00:00
Add RHEL 9.0, Ubuntu 22.04 and Fedora 36 to CI (#358)
* Add RHEL 9.0 to CI. * Add RHEL 9 specific files. * Add Ubuntu 22.04 and Fedora 36 to CI. * Another try. * Adjust kernel memory tests. * Add more details. * RHEL 9 doesn't support setting memory swappiness. * Fix docker_swarm_service tests. The 'less' case should always have been changed, but it probably was always skipped due to a too old Docker SDK for Python or a too old Docker daemon. * More checks / improve checks.
This commit is contained in:
@@ -88,7 +88,7 @@
|
||||
- assert:
|
||||
that:
|
||||
- blkio_weight_1 is changed
|
||||
- "blkio_weight_2 is not changed or 'Docker warning: Your kernel does not support Block I/O weight or the cgroup is not mounted. Weight discarded.' in blkio_weight_2.warnings"
|
||||
- "blkio_weight_2 is not changed or 'Docker warning: Your kernel does not support Block I/O weight or the cgroup is not mounted. Weight discarded.' in (blkio_weight_2.warnings | default([]))"
|
||||
- blkio_weight_3 is changed
|
||||
|
||||
####################################################################
|
||||
@@ -2306,7 +2306,9 @@
|
||||
- kernel_memory_1 is changed
|
||||
- kernel_memory_2 is not changed
|
||||
- kernel_memory_3 is changed
|
||||
when: kernel_memory_1 is not failed or 'kernel memory accounting disabled in this runc build' not in kernel_memory_1.msg
|
||||
when:
|
||||
- kernel_memory_1 is not failed or 'kernel memory accounting disabled in this runc build' not in kernel_memory_1.msg
|
||||
- "'Docker warning: Specifying a kernel memory limit is deprecated and will be removed in a future release.' not in (kernel_memory_1.warnings | default([]))"
|
||||
|
||||
####################################################################
|
||||
## kill_signal #####################################################
|
||||
@@ -2569,7 +2571,7 @@
|
||||
- log_options_1 is changed
|
||||
- log_options_2 is not changed
|
||||
- "'Non-string value found for log_options option \\'max-file\\'. The value is automatically converted to \\'5\\'. If this is not correct, or you want to
|
||||
avoid such warnings, please quote the value.' in log_options_2.warnings"
|
||||
avoid such warnings, please quote the value.' in (log_options_2.warnings | default([]))"
|
||||
- log_options_3 is not changed
|
||||
- log_options_4 is changed
|
||||
|
||||
@@ -2846,6 +2848,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings"
|
||||
- memory_swappiness_1 is changed
|
||||
- memory_swappiness_2 is not changed
|
||||
- memory_swappiness_3 is changed
|
||||
when: "'Docker warning: Your kernel does not support memory swappiness capabilities or the cgroup is not mounted. Memory swappiness discarded.' not in (memory_swappiness_1.warnings | default([]))"
|
||||
|
||||
####################################################################
|
||||
## oom_killer ######################################################
|
||||
@@ -2891,6 +2894,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings"
|
||||
- oom_killer_1 is changed
|
||||
- oom_killer_2 is not changed
|
||||
- oom_killer_3 is changed
|
||||
when: "'Docker warning: Your kernel does not support OomKillDisable. OomKillDisable discarded.' not in (oom_killer_1.warnings | default([]))"
|
||||
|
||||
####################################################################
|
||||
## oom_score_adj ###################################################
|
||||
@@ -2936,6 +2940,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings"
|
||||
- oom_score_adj_1 is changed
|
||||
- oom_score_adj_2 is not changed
|
||||
- oom_score_adj_3 is changed
|
||||
when: "'Docker warning: Your kernel does not support OomScoreAdj. OomScoreAdj discarded.' not in (oom_score_adj_1.warnings | default([]))"
|
||||
|
||||
####################################################################
|
||||
## output_logs #####################################################
|
||||
|
||||
@@ -1950,6 +1950,7 @@
|
||||
- all
|
||||
register: capabilities_2
|
||||
ignore_errors: yes
|
||||
diff: true
|
||||
|
||||
- name: capabilities, cap_drop (less)
|
||||
docker_swarm_service:
|
||||
@@ -1962,6 +1963,7 @@
|
||||
- all
|
||||
register: capabilities_3
|
||||
ignore_errors: yes
|
||||
diff: true
|
||||
|
||||
- name: capabilities, cap_drop (changed)
|
||||
docker_swarm_service:
|
||||
@@ -1975,6 +1977,7 @@
|
||||
- all
|
||||
register: capabilities_4
|
||||
ignore_errors: yes
|
||||
diff: true
|
||||
|
||||
- name: cleanup
|
||||
docker_swarm_service:
|
||||
@@ -1986,7 +1989,7 @@
|
||||
that:
|
||||
- capabilities_1 is changed
|
||||
- capabilities_2 is not changed
|
||||
- capabilities_3 is not changed
|
||||
- capabilities_3 is changed
|
||||
- capabilities_4 is changed
|
||||
when: docker_api_version is version('1.41', '>=') and docker_py_version is version('5.0.3', '>=')
|
||||
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
---
|
||||
# The RHEL extras repository must be enabled to provide the container-selinux package.
|
||||
# See: https://docs.docker.com/engine/installation/linux/docker-ee/rhel/#install-using-the-repository
|
||||
|
||||
- name: Install Docker pre-reqs
|
||||
dnf:
|
||||
name: "{{ docker_prereq_packages }}"
|
||||
state: present
|
||||
notify: cleanup docker
|
||||
register: result
|
||||
until: result is success
|
||||
retries: 10
|
||||
delay: 2
|
||||
|
||||
# Docker broke their .repo file, so we set it up ourselves
|
||||
- name: Set-up repository
|
||||
yum_repository:
|
||||
name: docker-ce
|
||||
description: docker-ce
|
||||
baseurl: https://download.docker.com/linux/centos/{{ ansible_facts.distribution_major_version }}/$basearch/stable
|
||||
gpgcheck: true
|
||||
gpgkey: https://download.docker.com/linux/centos/gpg
|
||||
|
||||
- name: Install docker
|
||||
dnf:
|
||||
name: "{{ docker_packages if needs_docker_daemon else docker_cli_packages }}"
|
||||
state: present
|
||||
notify: cleanup docker
|
||||
|
||||
- name: Make sure the docker daemon is running (failure expected inside docker container)
|
||||
service:
|
||||
name: docker
|
||||
state: started
|
||||
ignore_errors: "{{ ansible_virtualization_type in ['docker', 'container', 'containerd'] }}"
|
||||
when: needs_docker_daemon
|
||||
@@ -0,0 +1,13 @@
|
||||
---
|
||||
docker_prereq_packages:
|
||||
- yum-utils
|
||||
- device-mapper-persistent-data
|
||||
- lvm2
|
||||
- libseccomp
|
||||
- iptables
|
||||
|
||||
docker_packages:
|
||||
- docker-ce # -19.03.13
|
||||
- docker-ce-cli # -19.03.13
|
||||
docker_cli_packages:
|
||||
- docker-ce-cli # -19.03.13
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
- name: Install docker-compose as system package
|
||||
dnf:
|
||||
name: "{{ docker_compose_packages }}"
|
||||
state: present
|
||||
@@ -0,0 +1,2 @@
|
||||
---
|
||||
docker_compose_packages: []
|
||||
Reference in New Issue
Block a user