Fix repo enablement for RHEL during registration
Previously the REG_REPOS value was a space delimited list of repo names, but the spaces were incompatible with passing through json. If you pass a list in json through the heat parameter, the output is the string representation of a python list of unicode vaules. This patch changes the rhel-registration scripts to process the REG_REPOS value as a comma delimited list which is more easily passed through json. Both scripts have been updated to remain consistent. Change-Id: I21b3fd115e53aa3b0fa4af9bbfb1f08b6fe163ab
This commit is contained in:
parent
bf8b77a8ea
commit
386a7a01d3
@ -81,8 +81,8 @@ It will change over time as new releases come out. There are also variants
|
|||||||
|
|
||||||
#### REG\_REPOS
|
#### REG\_REPOS
|
||||||
A single string representing a list of repository names separated by a
|
A single string representing a list of repository names separated by a
|
||||||
space. Each of the repositories in this string are enabled through
|
comma (No spaces). Each of the repositories in this string are enabled
|
||||||
subscription manager. Once you've attached a subscription, you can
|
through subscription manager. Once you've attached a subscription, you can
|
||||||
find available repositories by running subscription-manager repos --list.
|
find available repositories by running subscription-manager repos --list.
|
||||||
|
|
||||||
#### REG\_SERVER\_URL
|
#### REG\_SERVER\_URL
|
||||||
@ -119,7 +119,7 @@ REG_METHOD=satellite
|
|||||||
To register with the Red Hat Customer Portal, a common example would be to
|
To register with the Red Hat Customer Portal, a common example would be to
|
||||||
set the following variables:
|
set the following variables:
|
||||||
|
|
||||||
REG_REPOS='rhel-7-server-optional-rpms rhel-7-server-extras-rpms'
|
REG_REPOS='rhel-7-server-optional-rpms,rhel-7-server-extras-rpms'
|
||||||
REG_AUTO_ATTACH=true
|
REG_AUTO_ATTACH=true
|
||||||
REG_USER='tripleo'
|
REG_USER='tripleo'
|
||||||
REG_PASSWORD='tripleo'
|
REG_PASSWORD='tripleo'
|
||||||
@ -165,8 +165,8 @@ Heat metadata can be used to configure the rhel-common element.
|
|||||||
# minor release version. This is only used with the auto_attach
|
# minor release version. This is only used with the auto_attach
|
||||||
# option.
|
# option.
|
||||||
repos:
|
repos:
|
||||||
# A single string representing a list of repository names separated
|
# A single string representing a list of repository names separated by a
|
||||||
# by a space. Each of the repositories in this string are enabled
|
# comma (No spaces). Each of the repositories in this string are enabled
|
||||||
# through subscription manager.
|
# through subscription manager.
|
||||||
satellite_url:
|
satellite_url:
|
||||||
# The url of the Satellite instance to register with. Required for
|
# The url of the Satellite instance to register with. Required for
|
||||||
@ -214,7 +214,7 @@ use the following metadata:
|
|||||||
|
|
||||||
{
|
{
|
||||||
"rh_registration":{
|
"rh_registration":{
|
||||||
"repos":"rhel-7-server-optional-rpms rhel-7-server-extras-rpms",
|
"repos":"rhel-7-server-optional-rpms,rhel-7-server-extras-rpms",
|
||||||
"auto_attach":true,
|
"auto_attach":true,
|
||||||
"user":"tripleo",
|
"user":"tripleo",
|
||||||
"password":"tripleo",
|
"password":"tripleo",
|
||||||
|
@ -89,7 +89,7 @@ if [ -n "${REG_ORG:-}" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "${REG_REPOS:-}" ]; then
|
if [ -n "${REG_REPOS:-}" ]; then
|
||||||
for repo in $REG_REPOS; do
|
for repo in $(echo $REG_REPOS | tr ',' '\n'); do
|
||||||
repos="$repos --enable $repo"
|
repos="$repos --enable $repo"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
@ -72,7 +72,7 @@ if [ -n "${REG_ORG:-}" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "${REG_REPOS:-}" ]; then
|
if [ -n "${REG_REPOS:-}" ]; then
|
||||||
for repo in $REG_REPOS; do
|
for repo in $(echo $REG_REPOS | tr ',' '\n'); do
|
||||||
repos="$repos --enable $repo"
|
repos="$repos --enable $repo"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user