Merge "Remove sudo from mkdir in $STACK_USER folder"
This commit is contained in:
commit
2cee71865f
@ -73,21 +73,23 @@ function save_stackenv {
|
|||||||
# - A `devstack-admin` entry for the `admin` user for the `admin` project.
|
# - A `devstack-admin` entry for the `admin` user for the `admin` project.
|
||||||
# write_clouds_yaml
|
# write_clouds_yaml
|
||||||
function write_clouds_yaml {
|
function write_clouds_yaml {
|
||||||
# The location is a variable to allow for easier refactoring later to make it
|
local clouds_yaml
|
||||||
# overridable. There is currently no usecase where doing so makes sense, so
|
|
||||||
# it's not currently configurable.
|
|
||||||
for clouds_path in /etc/openstack ~/.config/openstack ; do
|
|
||||||
CLOUDS_YAML=$clouds_path/clouds.yaml
|
|
||||||
|
|
||||||
sudo mkdir -p $(dirname $CLOUDS_YAML)
|
sudo mkdir -p /etc/openstack
|
||||||
sudo chown -R $STACK_USER $(dirname $CLOUDS_YAML)
|
sudo chown -R $STACK_USER /etc/openstack
|
||||||
|
# XXX: to be removed, see https://review.openstack.org/237149/
|
||||||
|
# careful not to sudo this, incase ~ is NFS mounted
|
||||||
|
mkdir -p ~/.config/openstack
|
||||||
|
|
||||||
|
for clouds_path in /etc/openstack ~/.config/openstack ; do
|
||||||
|
clouds_yaml=$clouds_path/clouds.yaml
|
||||||
|
|
||||||
CA_CERT_ARG=''
|
CA_CERT_ARG=''
|
||||||
if [ -f "$SSL_BUNDLE_FILE" ]; then
|
if [ -f "$SSL_BUNDLE_FILE" ]; then
|
||||||
CA_CERT_ARG="--os-cacert $SSL_BUNDLE_FILE"
|
CA_CERT_ARG="--os-cacert $SSL_BUNDLE_FILE"
|
||||||
fi
|
fi
|
||||||
$TOP_DIR/tools/update_clouds_yaml.py \
|
$TOP_DIR/tools/update_clouds_yaml.py \
|
||||||
--file $CLOUDS_YAML \
|
--file $clouds_yaml \
|
||||||
--os-cloud devstack \
|
--os-cloud devstack \
|
||||||
--os-region-name $REGION_NAME \
|
--os-region-name $REGION_NAME \
|
||||||
--os-identity-api-version 3 \
|
--os-identity-api-version 3 \
|
||||||
@ -97,7 +99,7 @@ function write_clouds_yaml {
|
|||||||
--os-password $ADMIN_PASSWORD \
|
--os-password $ADMIN_PASSWORD \
|
||||||
--os-project-name demo
|
--os-project-name demo
|
||||||
$TOP_DIR/tools/update_clouds_yaml.py \
|
$TOP_DIR/tools/update_clouds_yaml.py \
|
||||||
--file $CLOUDS_YAML \
|
--file $clouds_yaml \
|
||||||
--os-cloud devstack-admin \
|
--os-cloud devstack-admin \
|
||||||
--os-region-name $REGION_NAME \
|
--os-region-name $REGION_NAME \
|
||||||
--os-identity-api-version 3 \
|
--os-identity-api-version 3 \
|
||||||
|
Loading…
Reference in New Issue
Block a user