Add PRE_CONFIG_OSA option and move the RUN_OSA to the run playbook part

Add PRE_CONFIG_OSA to set up the user_variable and all the other
parameters for OSA powered cloud, and move the RUN_OSA to the playbook
part.

Change-Id: Ia962e42466dd2a123e30b1a9c37e60a371710842
This commit is contained in:
Weezer Su 2016-11-02 11:31:14 -05:00
parent 7a8d7abf48
commit ff9002ba36
2 changed files with 10 additions and 3 deletions

View File

@ -136,6 +136,9 @@ Instruct the system do all of the cobbler setup:
Instruct the system do all of the virsh network setup:
``SETUP_VIRSH_NET=${SETUP_VIRSH_NET:-true}``
Instruct the system to pre-config the envs for running OSA playbooks:
``PRE_CONFIG_OSA=${PRE_CONFIG_OSA:-true}``
Instruct the system to run the OSA playbooks, if you want to deploy other OSA powered cloud, you can set it to false:
``RUN_OSA=${RUN_OSA:-true}``

View File

@ -77,9 +77,9 @@ write_osa_swift_proxy_confd swift-proxy_hosts swift
write_osa_swift_storage_confd swift_hosts swift
### =========== END WRITE OF conf.d FILES =========== ###
# Enable deploy OSA of the "${RUN_OSA}"
RUN_OSA=${RUN_OSA:-true}
if [[ "${RUN_OSA}" = true ]]; then
# Enable pre-config the OSA enviroment for deploying OSA.
PRE_CONFIG_OSA=${PRE_CONFIG_OSA:-true}
if [[ "${PRE_CONFIG_OSA}" = true ]]; then
pushd /opt/openstack-ansible/
# Bootstrap ansible into the environment
bash ./scripts/bootstrap-ansible.sh
@ -99,7 +99,11 @@ if [[ "${RUN_OSA}" = true ]]; then
# This makes the glance image store use swift instead of the file backend
osa_user_var_add glance_default_store 'glance_default_store: swift'
popd
fi
# Enable deploy OSA of the "${RUN_OSA}"
RUN_OSA=${RUN_OSA:-true}
if [[ "${RUN_OSA}" = true ]]; then
# Set the number of forks for the ansible client calls
export ANSIBLE_FORKS=${ANSIBLE_FORKS:-15}