| |
@@ -46,6 +46,23 @@
|
| |
# Only manually install packages on non atomic hosts
|
| |
when: ansible_pkg_mgr != 'unknown'
|
| |
|
| |
+ - block:
|
| |
+ - name: Check packages required by the test (atomic)
|
| |
+ shell: rpm -q {{ required_packages|join(" ") }}
|
| |
+ register: package_check
|
| |
+ changed_when: no
|
| |
+ failed_when: no
|
| |
+ args: { warn: no }
|
| |
+
|
| |
+ - name: Install packages required by the test (atomic)
|
| |
+ shell:
|
| |
+ rpm-ostree install {{ required_packages|join(" ") }}
|
| |
+ && rpm-ostree ex livefs
|
| |
+ when: package_check.rc != 0
|
| |
+
|
| |
+ tags: atomic
|
| |
+ when: required_packages.0 is defined
|
| |
+
|
| |
- name: Define remote_artifacts if it is not already defined
|
| |
set_fact:
|
| |
remote_artifacts: /tmp/artifacts
|
| |
It seems the need for installing extra packages to satisfy test
dependencies is quite common. Despite using rpm-ostree is probably
not a completely clear solution I believe we should make this
option available. This commit adds support to the beakerlib role.