diskimage-builder/diskimage_builder/elements/rhel-common/pre-install.d/01-module-configuration
Lon Hohberger 5299371957 rhel-common: Provide method to select module streams
Some OpenStack releases on RHEL require specific modules
in order to function correctly.  This adds the ability
to set DIB_DNF_MODULE_STREAMS which then are selected
prior to package installation.

Change-Id: I78d7bcf214a45245e2073428120fcbdd968e1acd
Signed-off-by: Lon Hohberger <lhh@redhat.com>
2020-09-16 08:43:30 -04:00

23 lines
466 B
Bash
Executable File

#!/bin/bash
#
# When building RHEL overcloud images, certain modules may be preferred
# or even required.
#
# For example, container-tools:2.0 is notably a requirement when running
# the Train releases on RHEL 8.2.
#
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
set -x
fi
set -eu
set -o pipefail
if [ "${YUM}" == "dnf" ]; then
for m in ${DIB_DNF_MODULE_STREAMS}; do
${YUM} -y module disable ${m/:*/}
${YUM} -y module enable ${m}
done
fi