diff --git a/diskimage_builder/elements/rhel-common/os-refresh-config/pre-configure.d/06-rhel-registration b/diskimage_builder/elements/rhel-common/os-refresh-config/pre-configure.d/06-rhel-registration index 83f394882..d38ac7806 100755 --- a/diskimage_builder/elements/rhel-common/os-refresh-config/pre-configure.d/06-rhel-registration +++ b/diskimage_builder/elements/rhel-common/os-refresh-config/pre-configure.d/06-rhel-registration @@ -124,6 +124,9 @@ case "${REG_METHOD:-}" in fi echo "Enabling repos: $repos" subscription-manager $repos + if [ -n "${REG_RELEASE:-}" ]; then + subscription-manager release --set=${REG_RELEASE} + fi ;; satellite) # Save an unmodified copy of the repo list for logging diff --git a/diskimage_builder/elements/rhel-common/pre-install.d/00-rhel-registration b/diskimage_builder/elements/rhel-common/pre-install.d/00-rhel-registration index b9a3f29bb..5f402a385 100755 --- a/diskimage_builder/elements/rhel-common/pre-install.d/00-rhel-registration +++ b/diskimage_builder/elements/rhel-common/pre-install.d/00-rhel-registration @@ -102,6 +102,9 @@ case "${REG_METHOD:-}" in subscription-manager repos --disable=\* echo "Enabling repos: $repos" subscription-manager $repos + if [ -n "${REG_RELEASE:-}" ]; then + subscription-manager release --set=${REG_RELEASE} + fi ;; satellite) # Save an unmodified copy of the repo list for logging