tripleo-ansible/tripleo_ansible/roles/tripleo_bootstrap
Cédric Jeanneret cca76e8dfe Ensure bootstrap packages are correctly installed
It may happen a package fails to properly install (especially for
openstack-selinux). Unfortunately, in such cases rpm will just output
some warning lost in the output, and will still exit with a success code
(0).

This patch allows to leverage the "--verify" option of RPM. If a package
spec file has a %verifyscript scriptlet, it will be called, and do
whatever is described in it.
In openstack-selinux case, it will ensure everything is actually
installed without issue[1].
If a package doesn't have the %verifyscript, rpm will just exit 0
without any error nor warning.

Note:
the failed_when condition allows to:
- protect against missing package (openvswitch)
- ensure we're actually failing on the %verifyscript
The second part is useful when we don't get the doc for package -
apparently, this is the case for python3-pyyaml, at least in CI
(molecule).

[1] https://review.rdoproject.org/r/c/openstack/openstack-selinux-distgit/+/43578

Change-Id: Iec1e79c9c1cbb6b7e5e7b768d425aab8270c1d89
(cherry picked from commit 2f29bfb7e0)
2022-07-08 10:13:42 +00:00
..
defaults Add release version package 2020-09-14 07:19:40 -06:00
meta fix galaxy meta requirements 2021-09-23 14:36:41 +02:00
molecule/default Use default molecule config for roles having delegated driver 2022-06-29 14:21:13 +05:30
tasks Ensure bootstrap packages are correctly installed 2022-07-08 10:13:42 +00:00
vars Add el9 vars file for bootstrap 2021-12-22 09:25:01 +00:00