Run molecule in systemd scope user
Use latest podman in molecule tests instead of pin to 1.6.4 and Run all with "systemd-run --scope --user" to avoid podman 2.0.5 bug: https://github.com/containers/podman/issues/8965 Related-Bug: #1910970 Change-Id: Iba57bcff7d6e3870ccf074b72907e1bce44e039b
This commit is contained in:
parent
722e2a122b
commit
f51562cdb1
|
@ -15,17 +15,6 @@
|
||||||
include_role:
|
include_role:
|
||||||
name: ensure-pip
|
name: ensure-pip
|
||||||
|
|
||||||
# https://github.com/containers/podman/issues/8965
|
|
||||||
# podman rootless systemd is broken in 2.0.5, so we use 1.6.4
|
|
||||||
- name: Pin container-tools
|
|
||||||
become: true
|
|
||||||
shell: |
|
|
||||||
dnf module disable container-tools:rhel8 -y
|
|
||||||
dnf module enable container-tools:2.0 -y
|
|
||||||
when:
|
|
||||||
- (ansible_os_family | lower) == "redhat"
|
|
||||||
- (ansible_distribution_major_version | int) >= 8
|
|
||||||
|
|
||||||
- name: Setup bindep
|
- name: Setup bindep
|
||||||
pip:
|
pip:
|
||||||
name: "bindep"
|
name: "bindep"
|
||||||
|
|
|
@ -20,11 +20,13 @@
|
||||||
when: tripleo_role_name is not defined
|
when: tripleo_role_name is not defined
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
|
# Remove 'systemd-run --scope --user' when podman has version >2.0.5
|
||||||
|
# see issue: https://github.com/containers/podman/issues/8965
|
||||||
- name: Run role test job
|
- name: Run role test job
|
||||||
shell: |-
|
shell: |-
|
||||||
. {{ ansible_user_dir }}/test-python/bin/activate
|
. {{ ansible_user_dir }}/test-python/bin/activate
|
||||||
. {{ tripleo_ansible_project_path }}/ansible-test-env.rc
|
. {{ tripleo_ansible_project_path }}/ansible-test-env.rc
|
||||||
pytest --color=no \
|
systemd-run --scope --user pytest --color=no \
|
||||||
--html={{ ansible_user_dir }}/zuul-output/logs/reports.html \
|
--html={{ ansible_user_dir }}/zuul-output/logs/reports.html \
|
||||||
--self-contained-html \
|
--self-contained-html \
|
||||||
--ansible-args='{{ tripleo_job_ansible_args | default('') }}' \
|
--ansible-args='{{ tripleo_job_ansible_args | default('') }}' \
|
||||||
|
|
Loading…
Reference in New Issue