Merge "Fix for passing user defined value for satellite cert for rhel-common."
This commit is contained in:
commit
30d5ee2ec7
@ -210,6 +210,10 @@ Heat metadata can be used to configure the rhel-common element.
|
|||||||
# system with the Red Hat Customer Portal. Use "satellite" to
|
# system with the Red Hat Customer Portal. Use "satellite" to
|
||||||
# register a system with Red Hat Satellite 6. Use "disable" to
|
# register a system with Red Hat Satellite 6. Use "disable" to
|
||||||
# skip the registration process.
|
# skip the registration process.
|
||||||
|
satellite_cert:
|
||||||
|
# Defines the ssl certificate to be installed when using "satellite"
|
||||||
|
# as register mechanism. Default values of this is
|
||||||
|
# "katello-ca-consumer-latest.noarch.rpm".
|
||||||
|
|
||||||
Configuration Registration Examples
|
Configuration Registration Examples
|
||||||
------------------------------------
|
------------------------------------
|
||||||
|
@ -23,6 +23,7 @@ REG_POOL_ID="$(os-apply-config --key rh_registration.poolid --type raw --key-def
|
|||||||
REG_RELEASE="$(os-apply-config --key rh_registration.release --type raw --key-default '')"
|
REG_RELEASE="$(os-apply-config --key rh_registration.release --type raw --key-default '')"
|
||||||
REG_REPOS="$(os-apply-config --key rh_registration.repos --type raw --key-default '')"
|
REG_REPOS="$(os-apply-config --key rh_registration.repos --type raw --key-default '')"
|
||||||
REG_SAT_URL="$(os-apply-config --key rh_registration.satellite_url --type raw --key-default '')"
|
REG_SAT_URL="$(os-apply-config --key rh_registration.satellite_url --type raw --key-default '')"
|
||||||
|
REG_SAT_CERT="$(os-apply-config --key rh_registration.satellite_cert --type raw --key-default '')"
|
||||||
REG_SERVER_URL="$(os-apply-config --key rh_registration.server_url --type raw --key-default '')"
|
REG_SERVER_URL="$(os-apply-config --key rh_registration.server_url --type raw --key-default '')"
|
||||||
REG_SERVICE_LEVEL="$(os-apply-config --key rh_registration.service_level --type raw --key-default '')"
|
REG_SERVICE_LEVEL="$(os-apply-config --key rh_registration.service_level --type raw --key-default '')"
|
||||||
REG_USER="$(os-apply-config --key rh_registration.user --type raw --key-default '')"
|
REG_USER="$(os-apply-config --key rh_registration.user --type raw --key-default '')"
|
||||||
@ -33,6 +34,7 @@ opts=
|
|||||||
attach_opts=
|
attach_opts=
|
||||||
repos="repos --enable rhel-7-server-rpms"
|
repos="repos --enable rhel-7-server-rpms"
|
||||||
satellite_repo="rhel-7-server-rh-common-rpms"
|
satellite_repo="rhel-7-server-rh-common-rpms"
|
||||||
|
REG_SAT_CERT=${REG_SAT_CERT:-"katello-ca-consumer-latest.noarch.rpm"}
|
||||||
if [ -n "${REG_AUTO_ATTACH:-}" ]; then
|
if [ -n "${REG_AUTO_ATTACH:-}" ]; then
|
||||||
opts="$opts --auto-attach"
|
opts="$opts --auto-attach"
|
||||||
|
|
||||||
@ -128,7 +130,7 @@ case "${REG_METHOD:-}" in
|
|||||||
user_repos=$repos
|
user_repos=$repos
|
||||||
repos="$repos --enable ${satellite_repo}"
|
repos="$repos --enable ${satellite_repo}"
|
||||||
echo "Installing satellite dependencies"
|
echo "Installing satellite dependencies"
|
||||||
rpm -Uvh "$REG_SAT_URL/pub/katello-ca-consumer-latest.noarch.rpm" || true
|
rpm -Uvh "$REG_SAT_URL/pub/$REG_SAT_CERT" || true
|
||||||
echo "Registering with options: $sanitized_opts"
|
echo "Registering with options: $sanitized_opts"
|
||||||
subscription-manager register $opts
|
subscription-manager register $opts
|
||||||
echo "Disabling all previous repos"
|
echo "Disabling all previous repos"
|
||||||
|
@ -11,6 +11,7 @@ opts=
|
|||||||
attach_opts=
|
attach_opts=
|
||||||
repos="repos --enable rhel-7-server-rpms"
|
repos="repos --enable rhel-7-server-rpms"
|
||||||
satellite_repo="rhel-7-server-rh-common-rpms"
|
satellite_repo="rhel-7-server-rh-common-rpms"
|
||||||
|
REG_SAT_CERT=${REG_SAT_CERT:-"katello-ca-consumer-latest.noarch.rpm"}
|
||||||
|
|
||||||
if [ -n "${REG_AUTO_ATTACH:-}" ]; then
|
if [ -n "${REG_AUTO_ATTACH:-}" ]; then
|
||||||
opts="$opts --auto-attach"
|
opts="$opts --auto-attach"
|
||||||
@ -107,7 +108,7 @@ case "${REG_METHOD:-}" in
|
|||||||
user_repos=$repos
|
user_repos=$repos
|
||||||
repos="$repos --enable ${satellite_repo}"
|
repos="$repos --enable ${satellite_repo}"
|
||||||
echo "Installing satellite dependencies"
|
echo "Installing satellite dependencies"
|
||||||
rpm -Uvh "$REG_SAT_URL/pub/katello-ca-consumer-latest.noarch.rpm" || true
|
rpm -Uvh "$REG_SAT_URL/pub/$REG_SAT_CERT" || true
|
||||||
echo "Registering with options: $sanitized_opts"
|
echo "Registering with options: $sanitized_opts"
|
||||||
subscription-manager register $opts
|
subscription-manager register $opts
|
||||||
echo "Disabling all previous repos"
|
echo "Disabling all previous repos"
|
||||||
|
Loading…
Reference in New Issue
Block a user