mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
docker_*: enable RHEL8 tests (#53313)
This commit is contained in:
parent
56e3597856
commit
1323dca9e9
21 changed files with 43 additions and 33 deletions
|
@ -2,7 +2,6 @@ shippable/posix/group2
|
||||||
skip/osx
|
skip/osx
|
||||||
skip/freebsd
|
skip/freebsd
|
||||||
destructive
|
destructive
|
||||||
skip/rhel8.0
|
|
||||||
skip/docker # The tests sometimes make docker daemon unstable; hence,
|
skip/docker # The tests sometimes make docker daemon unstable; hence,
|
||||||
# we skip all docker-based CI runs to avoid disrupting
|
# we skip all docker-based CI runs to avoid disrupting
|
||||||
# the whole CI system.
|
# the whole CI system.
|
||||||
|
|
|
@ -2,4 +2,3 @@ shippable/posix/group2
|
||||||
skip/osx
|
skip/osx
|
||||||
skip/freebsd
|
skip/freebsd
|
||||||
destructive
|
destructive
|
||||||
skip/rhel8.0
|
|
||||||
|
|
|
@ -2,4 +2,3 @@ shippable/posix/group2
|
||||||
skip/osx
|
skip/osx
|
||||||
skip/freebsd
|
skip/freebsd
|
||||||
destructive
|
destructive
|
||||||
skip/rhel8.0
|
|
||||||
|
|
|
@ -2,4 +2,3 @@ shippable/posix/group2
|
||||||
skip/osx
|
skip/osx
|
||||||
skip/freebsd
|
skip/freebsd
|
||||||
destructive
|
destructive
|
||||||
skip/rhel8.0
|
|
||||||
|
|
|
@ -2,4 +2,3 @@ shippable/posix/group2
|
||||||
skip/osx
|
skip/osx
|
||||||
skip/freebsd
|
skip/freebsd
|
||||||
destructive
|
destructive
|
||||||
skip/rhel8.0
|
|
||||||
|
|
|
@ -2,4 +2,3 @@ shippable/posix/group2
|
||||||
skip/osx
|
skip/osx
|
||||||
skip/freebsd
|
skip/freebsd
|
||||||
destructive
|
destructive
|
||||||
skip/rhel8.0
|
|
||||||
|
|
|
@ -2,4 +2,3 @@ shippable/posix/group2
|
||||||
skip/osx
|
skip/osx
|
||||||
skip/freebsd
|
skip/freebsd
|
||||||
destructive
|
destructive
|
||||||
skip/rhel8.0
|
|
||||||
|
|
|
@ -2,4 +2,3 @@ shippable/posix/group2
|
||||||
skip/osx
|
skip/osx
|
||||||
skip/freebsd
|
skip/freebsd
|
||||||
destructive
|
destructive
|
||||||
skip/rhel8.0
|
|
||||||
|
|
|
@ -2,7 +2,6 @@ shippable/posix/group2
|
||||||
skip/osx
|
skip/osx
|
||||||
skip/freebsd
|
skip/freebsd
|
||||||
destructive
|
destructive
|
||||||
skip/rhel8.0
|
|
||||||
skip/docker # The tests sometimes make docker daemon unstable; hence,
|
skip/docker # The tests sometimes make docker daemon unstable; hence,
|
||||||
# we skip all docker-based CI runs to avoid disrupting
|
# we skip all docker-based CI runs to avoid disrupting
|
||||||
# the whole CI system. On VMs, we restart docker daemon
|
# the whole CI system. On VMs, we restart docker daemon
|
||||||
|
|
|
@ -2,7 +2,6 @@ shippable/posix/group2
|
||||||
skip/osx
|
skip/osx
|
||||||
skip/freebsd
|
skip/freebsd
|
||||||
destructive
|
destructive
|
||||||
skip/rhel8.0
|
|
||||||
skip/docker # The tests sometimes make docker daemon unstable; hence,
|
skip/docker # The tests sometimes make docker daemon unstable; hence,
|
||||||
# we skip all docker-based CI runs to avoid disrupting
|
# we skip all docker-based CI runs to avoid disrupting
|
||||||
# the whole CI system.
|
# the whole CI system.
|
||||||
|
|
|
@ -2,4 +2,3 @@ shippable/posix/group2
|
||||||
skip/osx
|
skip/osx
|
||||||
skip/freebsd
|
skip/freebsd
|
||||||
destructive
|
destructive
|
||||||
skip/rhel8.0
|
|
||||||
|
|
|
@ -2,7 +2,6 @@ shippable/posix/group2
|
||||||
skip/osx
|
skip/osx
|
||||||
skip/freebsd
|
skip/freebsd
|
||||||
destructive
|
destructive
|
||||||
skip/rhel8.0
|
|
||||||
skip/docker # The tests sometimes make docker daemon unstable; hence,
|
skip/docker # The tests sometimes make docker daemon unstable; hence,
|
||||||
# we skip all docker-based CI runs to avoid disrupting
|
# we skip all docker-based CI runs to avoid disrupting
|
||||||
# the whole CI system.
|
# the whole CI system.
|
||||||
|
|
|
@ -2,7 +2,6 @@ shippable/posix/group2
|
||||||
skip/osx
|
skip/osx
|
||||||
skip/freebsd
|
skip/freebsd
|
||||||
destructive
|
destructive
|
||||||
skip/rhel8.0
|
|
||||||
skip/docker # The tests sometimes make docker daemon unstable; hence,
|
skip/docker # The tests sometimes make docker daemon unstable; hence,
|
||||||
# we skip all docker-based CI runs to avoid disrupting
|
# we skip all docker-based CI runs to avoid disrupting
|
||||||
# the whole CI system.
|
# the whole CI system.
|
||||||
|
|
|
@ -2,7 +2,6 @@ shippable/posix/group2
|
||||||
skip/osx
|
skip/osx
|
||||||
skip/freebsd
|
skip/freebsd
|
||||||
destructive
|
destructive
|
||||||
skip/rhel8.0
|
|
||||||
skip/docker # The tests sometimes make docker daemon unstable; hence,
|
skip/docker # The tests sometimes make docker daemon unstable; hence,
|
||||||
# we skip all docker-based CI runs to avoid disrupting
|
# we skip all docker-based CI runs to avoid disrupting
|
||||||
# the whole CI system. On VMs, we restart docker daemon
|
# the whole CI system. On VMs, we restart docker daemon
|
||||||
|
|
|
@ -44,8 +44,8 @@
|
||||||
docker_swarm:
|
docker_swarm:
|
||||||
advertise_addr: "{{ansible_default_ipv4.address | default('127.0.0.1')}}"
|
advertise_addr: "{{ansible_default_ipv4.address | default('127.0.0.1')}}"
|
||||||
state: present
|
state: present
|
||||||
signing_ca_cert: "{{ lookup('file', role_path ~ '/' ~ output_dir ~ '/ansible_key1.pem') }}"
|
signing_ca_cert: "{{ lookup('file', output_dir ~ '/ansible_key1.pem') }}"
|
||||||
signing_ca_key: "{{ lookup('file', role_path ~ '/' ~ output_dir ~ '/ansible_key1.key') }}"
|
signing_ca_key: "{{ lookup('file', output_dir ~ '/ansible_key1.key') }}"
|
||||||
timeout: 120
|
timeout: 120
|
||||||
check_mode: yes
|
check_mode: yes
|
||||||
diff: yes
|
diff: yes
|
||||||
|
@ -56,17 +56,17 @@
|
||||||
docker_swarm:
|
docker_swarm:
|
||||||
advertise_addr: "{{ansible_default_ipv4.address | default('127.0.0.1')}}"
|
advertise_addr: "{{ansible_default_ipv4.address | default('127.0.0.1')}}"
|
||||||
state: present
|
state: present
|
||||||
signing_ca_cert: "{{ lookup('file', role_path ~ '/' ~ output_dir ~ '/ansible_key1.pem') }}"
|
signing_ca_cert: "{{ lookup('file', output_dir ~ '/ansible_key1.pem') }}"
|
||||||
signing_ca_key: "{{ lookup('file', role_path ~ '/' ~ output_dir ~ '/ansible_key1.key') }}"
|
signing_ca_key: "{{ lookup('file', output_dir ~ '/ansible_key1.key') }}"
|
||||||
timeout: 120
|
timeout: 120
|
||||||
diff: yes
|
diff: yes
|
||||||
register: output_2
|
register: output_2
|
||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
|
|
||||||
- name: Private key
|
- name: Private key
|
||||||
debug: msg="{{ lookup('file', role_path ~ '/' ~ output_dir ~ '/ansible_key1.key') }}"
|
debug: msg="{{ lookup('file', output_dir ~ '/ansible_key1.key') }}"
|
||||||
- name: Cert
|
- name: Cert
|
||||||
debug: msg="{{ lookup('file', role_path ~ '/' ~ output_dir ~ '/ansible_key1.pem') }}"
|
debug: msg="{{ lookup('file', output_dir ~ '/ansible_key1.pem') }}"
|
||||||
- docker_swarm_facts:
|
- docker_swarm_facts:
|
||||||
register: output
|
register: output
|
||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
|
@ -77,8 +77,8 @@
|
||||||
#- name: signing_ca_cert and signing_ca_key (idempotent)
|
#- name: signing_ca_cert and signing_ca_key (idempotent)
|
||||||
# docker_swarm:
|
# docker_swarm:
|
||||||
# state: present
|
# state: present
|
||||||
# signing_ca_cert: "{{ lookup('file', role_path ~ '/' ~ output_dir ~ '/ansible_key1.pem') }}"
|
# signing_ca_cert: "{{ lookup('file', output_dir ~ '/ansible_key1.pem') }}"
|
||||||
# signing_ca_key: "{{ lookup('file', role_path ~ '/' ~ output_dir ~ '/ansible_key1.key') }}"
|
# signing_ca_key: "{{ lookup('file', output_dir ~ '/ansible_key1.key') }}"
|
||||||
# timeout: 120
|
# timeout: 120
|
||||||
# diff: yes
|
# diff: yes
|
||||||
# register: output_3
|
# register: output_3
|
||||||
|
@ -87,8 +87,8 @@
|
||||||
#- name: signing_ca_cert and signing_ca_key (idempotent, check mode)
|
#- name: signing_ca_cert and signing_ca_key (idempotent, check mode)
|
||||||
# docker_swarm:
|
# docker_swarm:
|
||||||
# state: present
|
# state: present
|
||||||
# signing_ca_cert: "{{ lookup('file', role_path ~ '/' ~ output_dir ~ '/ansible_key1.pem') }}"
|
# signing_ca_cert: "{{ lookup('file', output_dir ~ '/ansible_key1.pem') }}"
|
||||||
# signing_ca_key: "{{ lookup('file', role_path ~ '/' ~ output_dir ~ '/ansible_key1.key') }}"
|
# signing_ca_key: "{{ lookup('file', output_dir ~ '/ansible_key1.key') }}"
|
||||||
# timeout: 120
|
# timeout: 120
|
||||||
# check_mode: yes
|
# check_mode: yes
|
||||||
# diff: yes
|
# diff: yes
|
||||||
|
@ -98,8 +98,8 @@
|
||||||
- name: signing_ca_cert and signing_ca_key (change, check mode)
|
- name: signing_ca_cert and signing_ca_key (change, check mode)
|
||||||
docker_swarm:
|
docker_swarm:
|
||||||
state: present
|
state: present
|
||||||
signing_ca_cert: "{{ lookup('file', role_path ~ '/' ~ output_dir ~ '/ansible_key2.pem') }}"
|
signing_ca_cert: "{{ lookup('file', output_dir ~ '/ansible_key2.pem') }}"
|
||||||
signing_ca_key: "{{ lookup('file', role_path ~ '/' ~ output_dir ~ '/ansible_key2.key') }}"
|
signing_ca_key: "{{ lookup('file', output_dir ~ '/ansible_key2.key') }}"
|
||||||
timeout: 120
|
timeout: 120
|
||||||
check_mode: yes
|
check_mode: yes
|
||||||
diff: yes
|
diff: yes
|
||||||
|
@ -109,8 +109,8 @@
|
||||||
- name: signing_ca_cert and signing_ca_key (change)
|
- name: signing_ca_cert and signing_ca_key (change)
|
||||||
docker_swarm:
|
docker_swarm:
|
||||||
state: present
|
state: present
|
||||||
signing_ca_cert: "{{ lookup('file', role_path ~ '/' ~ output_dir ~ '/ansible_key2.pem') }}"
|
signing_ca_cert: "{{ lookup('file', output_dir ~ '/ansible_key2.pem') }}"
|
||||||
signing_ca_key: "{{ lookup('file', role_path ~ '/' ~ output_dir ~ '/ansible_key2.key') }}"
|
signing_ca_key: "{{ lookup('file', output_dir ~ '/ansible_key2.key') }}"
|
||||||
timeout: 120
|
timeout: 120
|
||||||
diff: yes
|
diff: yes
|
||||||
register: output_6
|
register: output_6
|
||||||
|
|
|
@ -2,7 +2,6 @@ shippable/posix/group2
|
||||||
skip/osx
|
skip/osx
|
||||||
skip/freebsd
|
skip/freebsd
|
||||||
destructive
|
destructive
|
||||||
skip/rhel8.0
|
|
||||||
skip/docker # The tests sometimes make docker daemon unstable; hence,
|
skip/docker # The tests sometimes make docker daemon unstable; hence,
|
||||||
# we skip all docker-based CI runs to avoid disrupting
|
# we skip all docker-based CI runs to avoid disrupting
|
||||||
# the whole CI system.
|
# the whole CI system.
|
||||||
|
|
|
@ -2,7 +2,6 @@ shippable/posix/group2
|
||||||
skip/osx
|
skip/osx
|
||||||
skip/freebsd
|
skip/freebsd
|
||||||
destructive
|
destructive
|
||||||
skip/rhel8.0
|
|
||||||
skip/docker # The tests sometimes make docker daemon unstable; hence,
|
skip/docker # The tests sometimes make docker daemon unstable; hence,
|
||||||
# we skip all docker-based CI runs to avoid disrupting
|
# we skip all docker-based CI runs to avoid disrupting
|
||||||
# the whole CI system.
|
# the whole CI system.
|
||||||
|
|
|
@ -2,4 +2,3 @@ shippable/posix/group2
|
||||||
skip/osx
|
skip/osx
|
||||||
skip/freebsd
|
skip/freebsd
|
||||||
destructive
|
destructive
|
||||||
skip/rhel8.0
|
|
||||||
|
|
|
@ -2,4 +2,3 @@ shippable/posix/group2
|
||||||
skip/osx
|
skip/osx
|
||||||
skip/freebsd
|
skip/freebsd
|
||||||
destructive
|
destructive
|
||||||
skip/rhel8.0
|
|
||||||
|
|
25
test/integration/targets/setup_docker/tasks/RHEL8.yml
Normal file
25
test/integration/targets/setup_docker/tasks/RHEL8.yml
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
# 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:
|
||||||
|
- dnf-utils
|
||||||
|
- device-mapper-persistent-data
|
||||||
|
- lvm2
|
||||||
|
- libseccomp
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: Set-up repository
|
||||||
|
command: dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
|
||||||
|
|
||||||
|
- name: Install docker
|
||||||
|
dnf:
|
||||||
|
name: docker-ce
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: Make sure the docker daemon is running (failure expected inside docker container)
|
||||||
|
service:
|
||||||
|
name: docker
|
||||||
|
state: started
|
||||||
|
ignore_errors: "{{ ansible_virtualization_type == 'docker' }}"
|
|
@ -2,13 +2,16 @@
|
||||||
is_rhel: "{{ ansible_os_family == 'RedHat' and ansible_distribution != 'Fedora' }}"
|
is_rhel: "{{ ansible_os_family == 'RedHat' and ansible_distribution != 'Fedora' }}"
|
||||||
is_rhel6: "{{ is_rhel and ansible_distribution_major_version == '6' }}"
|
is_rhel6: "{{ is_rhel and ansible_distribution_major_version == '6' }}"
|
||||||
is_rhel7: "{{ is_rhel and ansible_distribution_major_version == '7' }}"
|
is_rhel7: "{{ is_rhel and ansible_distribution_major_version == '7' }}"
|
||||||
|
is_rhel8: "{{ is_rhel and ansible_distribution_major_version == '8' }}"
|
||||||
block:
|
block:
|
||||||
- include_tasks: "{{ lookup('first_found', params) }}"
|
- include_tasks: "{{ lookup('first_found', params) }}"
|
||||||
vars:
|
vars:
|
||||||
params:
|
params:
|
||||||
- '{{ ansible_distribution }}.yml'
|
- '{{ ansible_distribution }}.yml'
|
||||||
- '{{ ansible_os_family }}.yml'
|
- '{{ ansible_os_family }}.yml'
|
||||||
when: not is_rhel6
|
when: not is_rhel6 and not is_rhel8
|
||||||
|
- include_tasks: RHEL8.yml
|
||||||
|
when: is_rhel8
|
||||||
|
|
||||||
- name: Install Python requirements
|
- name: Install Python requirements
|
||||||
vars:
|
vars:
|
||||||
|
|
Loading…
Reference in a new issue