diff --git a/elements/rhel-common/README.md b/elements/rhel-common/README.md index f2eb64cf..807e9246 100644 --- a/elements/rhel-common/README.md +++ b/elements/rhel-common/README.md @@ -71,7 +71,7 @@ the hostname. #### REG\_METHOD Sets the method of registration. Use "portal" to register a system with the Red Hat Customer Portal. Use "satellite" to register a system with Red -Hat Satellite 6. +Hat Satellite 6. Use "disable" to skip the registration process. #### REG\_ORG Gives the organization to which to join the system. @@ -204,7 +204,8 @@ Heat metadata can be used to configure the rhel-common element. method: # Sets the method of registration. Use "portal" to register a # system with the Red Hat Customer Portal. Use "satellite" to - # register a system with Red Hat Satellite 6. + # register a system with Red Hat Satellite 6. Use "disable" to + # skip the registration process. Configuration Registration Examples ------------------------------------ diff --git a/elements/rhel-common/os-refresh-config/pre-configure.d/06-rhel-registration b/elements/rhel-common/os-refresh-config/pre-configure.d/06-rhel-registration index a15c1a92..306e2427 100755 --- a/elements/rhel-common/os-refresh-config/pre-configure.d/06-rhel-registration +++ b/elements/rhel-common/os-refresh-config/pre-configure.d/06-rhel-registration @@ -118,7 +118,10 @@ case "${REG_METHOD:-}" in # beta-rpms repo only needed to support the katello-ca rpm above. subscription-manager repos --disable ${satellite_repo} ;; + disable) + echo "Disabling RHEL registration" + ;; *) - echo "WARNING: only 'portal' and 'satellite' are valid values for REG_METHOD." - exit 0 # keeps the stack from failing if you don't set a value in REG_METHOD + echo "WARNING: only 'portal', 'satellite', and 'disable' are valid values for REG_METHOD." + exit 0 esac diff --git a/elements/rhel-common/pre-install.d/00-rhel-registration b/elements/rhel-common/pre-install.d/00-rhel-registration index fb3b1d4d..bb979f8e 100755 --- a/elements/rhel-common/pre-install.d/00-rhel-registration +++ b/elements/rhel-common/pre-install.d/00-rhel-registration @@ -97,7 +97,11 @@ case "${REG_METHOD:-}" in # beta-rpms repo only needed to support the katello-ca rpm above. subscription-manager repos --disable rhel-7-server-rh-common-beta-rpms ;; + disable) + echo "Disabling RHEL registration" + export REG_HALT_UNREGISTER=1 # stops attempt to unregister + ;; *) - echo "WARNING: only 'portal' and 'satellite' are valid values for REG_METHOD." - exit 1 # RHEL requires registration, fail image build if REG_Method isn't set + echo "WARNING: only 'portal', 'satellite', and 'disable' are valid values for REG_METHOD." + exit 1 esac