Allow for disabling rhel registration
When using the rhel element, it can be uesful to disable registration. For instance, if using an internal mirror repository that does not require registration/authentication. Change-Id: I42fa34e7f146137e5b1b9c5d7785702311e1dca1
This commit is contained in:
parent
c597e99f4e
commit
697800987f
3 changed files with 14 additions and 6 deletions
|
@ -59,7 +59,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.
|
||||
|
@ -190,7 +190,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
|
||||
------------------------------------
|
||||
|
|
|
@ -116,7 +116,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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue