Ignore comments in openstack_user_config
Ignore comments in the config file to get the right host. Change-Id: I68b444a4fe1f180c9146b6b1df743de072615861
This commit is contained in:
parent
17a30dacc0
commit
c753f86d17
@ -218,7 +218,7 @@ function get_openstack_release_file {
|
|||||||
# Get openstack_user_config.yml file path
|
# Get openstack_user_config.yml file path
|
||||||
USER_CONFIG_FILE=$(find /etc/ -name '*_user_config.yml' -o -name 'os-infra_hosts.yml')
|
USER_CONFIG_FILE=$(find /etc/ -name '*_user_config.yml' -o -name 'os-infra_hosts.yml')
|
||||||
# Get IP of os_infra node
|
# Get IP of os_infra node
|
||||||
INFRA_IP=$(sed -n -e '/infra_hosts/, /ip:/ p' ${USER_CONFIG_FILE} | awk '/ip:/ {print $2; exit}')
|
INFRA_IP=$(sed -n -e '/^#/d' -e '/infra_hosts/, /ip:/ p' ${USER_CONFIG_FILE} | awk '/ip:/ {print $2; exit}')
|
||||||
if [[ -z "${INFRA_IP}" ]]; then
|
if [[ -z "${INFRA_IP}" ]]; then
|
||||||
failure "Could not find infra ip to get openstack-release file. Exiting.."
|
failure "Could not find infra ip to get openstack-release file. Exiting.."
|
||||||
exit 99
|
exit 99
|
||||||
|
Loading…
x
Reference in New Issue
Block a user