Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker_*: enable RHEL8 tests #53313

Merged
merged 2 commits into from
Mar 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion test/integration/targets/docker_config/aliases
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ shippable/posix/group2
skip/osx
skip/freebsd
destructive
skip/rhel8.0
skip/docker # The tests sometimes make docker daemon unstable; hence,
# we skip all docker-based CI runs to avoid disrupting
# the whole CI system.
1 change: 0 additions & 1 deletion test/integration/targets/docker_container/aliases
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@ shippable/posix/group2
skip/osx
skip/freebsd
destructive
skip/rhel8.0
1 change: 0 additions & 1 deletion test/integration/targets/docker_container_facts/aliases
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@ shippable/posix/group2
skip/osx
skip/freebsd
destructive
skip/rhel8.0
1 change: 0 additions & 1 deletion test/integration/targets/docker_host_facts/aliases
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@ shippable/posix/group2
skip/osx
skip/freebsd
destructive
skip/rhel8.0
1 change: 0 additions & 1 deletion test/integration/targets/docker_image/aliases
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@ shippable/posix/group2
skip/osx
skip/freebsd
destructive
skip/rhel8.0
1 change: 0 additions & 1 deletion test/integration/targets/docker_image_facts/aliases
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@ shippable/posix/group2
skip/osx
skip/freebsd
destructive
skip/rhel8.0
1 change: 0 additions & 1 deletion test/integration/targets/docker_network/aliases
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@ shippable/posix/group2
skip/osx
skip/freebsd
destructive
skip/rhel8.0
1 change: 0 additions & 1 deletion test/integration/targets/docker_network_facts/aliases
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@ shippable/posix/group2
skip/osx
skip/freebsd
destructive
skip/rhel8.0
1 change: 0 additions & 1 deletion test/integration/targets/docker_node/aliases
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ shippable/posix/group2
skip/osx
skip/freebsd
destructive
skip/rhel8.0
skip/docker # The tests sometimes make docker daemon unstable; hence,
# we skip all docker-based CI runs to avoid disrupting
# the whole CI system. On VMs, we restart docker daemon
Expand Down
1 change: 0 additions & 1 deletion test/integration/targets/docker_node_facts/aliases
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ shippable/posix/group2
skip/osx
skip/freebsd
destructive
skip/rhel8.0
skip/docker # The tests sometimes make docker daemon unstable; hence,
# we skip all docker-based CI runs to avoid disrupting
# the whole CI system.
1 change: 0 additions & 1 deletion test/integration/targets/docker_prune/aliases
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@ shippable/posix/group2
skip/osx
skip/freebsd
destructive
skip/rhel8.0
1 change: 0 additions & 1 deletion test/integration/targets/docker_secret/aliases
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ shippable/posix/group2
skip/osx
skip/freebsd
destructive
skip/rhel8.0
skip/docker # The tests sometimes make docker daemon unstable; hence,
# we skip all docker-based CI runs to avoid disrupting
# the whole CI system.
1 change: 0 additions & 1 deletion test/integration/targets/docker_stack/aliases
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ shippable/posix/group2
skip/osx
skip/freebsd
destructive
skip/rhel8.0
skip/docker # The tests sometimes make docker daemon unstable; hence,
# we skip all docker-based CI runs to avoid disrupting
# the whole CI system.
1 change: 0 additions & 1 deletion test/integration/targets/docker_swarm/aliases
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ shippable/posix/group2
skip/osx
skip/freebsd
destructive
skip/rhel8.0
skip/docker # The tests sometimes make docker daemon unstable; hence,
# we skip all docker-based CI runs to avoid disrupting
# the whole CI system. On VMs, we restart docker daemon
Expand Down
28 changes: 14 additions & 14 deletions test/integration/targets/docker_swarm/tasks/tests/options-ca.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
docker_swarm:
advertise_addr: "{{ansible_default_ipv4.address | default('127.0.0.1')}}"
state: present
signing_ca_cert: "{{ lookup('file', role_path ~ '/' ~ output_dir ~ '/ansible_key1.pem') }}"
signing_ca_key: "{{ lookup('file', role_path ~ '/' ~ output_dir ~ '/ansible_key1.key') }}"
signing_ca_cert: "{{ lookup('file', output_dir ~ '/ansible_key1.pem') }}"
signing_ca_key: "{{ lookup('file', output_dir ~ '/ansible_key1.key') }}"
timeout: 120
check_mode: yes
diff: yes
Expand All @@ -56,17 +56,17 @@
docker_swarm:
advertise_addr: "{{ansible_default_ipv4.address | default('127.0.0.1')}}"
state: present
signing_ca_cert: "{{ lookup('file', role_path ~ '/' ~ output_dir ~ '/ansible_key1.pem') }}"
signing_ca_key: "{{ lookup('file', role_path ~ '/' ~ output_dir ~ '/ansible_key1.key') }}"
signing_ca_cert: "{{ lookup('file', output_dir ~ '/ansible_key1.pem') }}"
signing_ca_key: "{{ lookup('file', output_dir ~ '/ansible_key1.key') }}"
timeout: 120
diff: yes
register: output_2
ignore_errors: yes

- 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
debug: msg="{{ lookup('file', role_path ~ '/' ~ output_dir ~ '/ansible_key1.pem') }}"
debug: msg="{{ lookup('file', output_dir ~ '/ansible_key1.pem') }}"
- docker_swarm_facts:
register: output
ignore_errors: yes
Expand All @@ -77,8 +77,8 @@
#- name: signing_ca_cert and signing_ca_key (idempotent)
# docker_swarm:
# state: present
# signing_ca_cert: "{{ lookup('file', role_path ~ '/' ~ output_dir ~ '/ansible_key1.pem') }}"
# signing_ca_key: "{{ lookup('file', role_path ~ '/' ~ output_dir ~ '/ansible_key1.key') }}"
# signing_ca_cert: "{{ lookup('file', output_dir ~ '/ansible_key1.pem') }}"
# signing_ca_key: "{{ lookup('file', output_dir ~ '/ansible_key1.key') }}"
# timeout: 120
# diff: yes
# register: output_3
Expand All @@ -87,8 +87,8 @@
#- name: signing_ca_cert and signing_ca_key (idempotent, check mode)
# docker_swarm:
# state: present
# signing_ca_cert: "{{ lookup('file', role_path ~ '/' ~ output_dir ~ '/ansible_key1.pem') }}"
# signing_ca_key: "{{ lookup('file', role_path ~ '/' ~ output_dir ~ '/ansible_key1.key') }}"
# signing_ca_cert: "{{ lookup('file', output_dir ~ '/ansible_key1.pem') }}"
# signing_ca_key: "{{ lookup('file', output_dir ~ '/ansible_key1.key') }}"
# timeout: 120
# check_mode: yes
# diff: yes
Expand All @@ -98,8 +98,8 @@
- name: signing_ca_cert and signing_ca_key (change, check mode)
docker_swarm:
state: present
signing_ca_cert: "{{ lookup('file', role_path ~ '/' ~ output_dir ~ '/ansible_key2.pem') }}"
signing_ca_key: "{{ lookup('file', role_path ~ '/' ~ output_dir ~ '/ansible_key2.key') }}"
signing_ca_cert: "{{ lookup('file', output_dir ~ '/ansible_key2.pem') }}"
signing_ca_key: "{{ lookup('file', output_dir ~ '/ansible_key2.key') }}"
timeout: 120
check_mode: yes
diff: yes
Expand All @@ -109,8 +109,8 @@
- name: signing_ca_cert and signing_ca_key (change)
docker_swarm:
state: present
signing_ca_cert: "{{ lookup('file', role_path ~ '/' ~ output_dir ~ '/ansible_key2.pem') }}"
signing_ca_key: "{{ lookup('file', role_path ~ '/' ~ output_dir ~ '/ansible_key2.key') }}"
signing_ca_cert: "{{ lookup('file', output_dir ~ '/ansible_key2.pem') }}"
signing_ca_key: "{{ lookup('file', output_dir ~ '/ansible_key2.key') }}"
timeout: 120
diff: yes
register: output_6
Expand Down
1 change: 0 additions & 1 deletion test/integration/targets/docker_swarm_facts/aliases
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ shippable/posix/group2
skip/osx
skip/freebsd
destructive
skip/rhel8.0
skip/docker # The tests sometimes make docker daemon unstable; hence,
# we skip all docker-based CI runs to avoid disrupting
# the whole CI system.
1 change: 0 additions & 1 deletion test/integration/targets/docker_swarm_service/aliases
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ shippable/posix/group2
skip/osx
skip/freebsd
destructive
skip/rhel8.0
skip/docker # The tests sometimes make docker daemon unstable; hence,
# we skip all docker-based CI runs to avoid disrupting
# the whole CI system.
1 change: 0 additions & 1 deletion test/integration/targets/docker_volume/aliases
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@ shippable/posix/group2
skip/osx
skip/freebsd
destructive
skip/rhel8.0
1 change: 0 additions & 1 deletion test/integration/targets/docker_volume_facts/aliases
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@ shippable/posix/group2
skip/osx
skip/freebsd
destructive
skip/rhel8.0
25 changes: 25 additions & 0 deletions test/integration/targets/setup_docker/tasks/RHEL8.yml
Original file line number Diff line number Diff line change
@@ -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' }}"
5 changes: 4 additions & 1 deletion test/integration/targets/setup_docker/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@
is_rhel: "{{ ansible_os_family == 'RedHat' and ansible_distribution != 'Fedora' }}"
is_rhel6: "{{ is_rhel and ansible_distribution_major_version == '6' }}"
is_rhel7: "{{ is_rhel and ansible_distribution_major_version == '7' }}"
is_rhel8: "{{ is_rhel and ansible_distribution_major_version == '8' }}"
block:
- include_tasks: "{{ lookup('first_found', params) }}"
vars:
params:
- '{{ ansible_distribution }}.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
vars:
Expand Down