diff options
author | Michael Chapman <michapma@redhat.com> | 2016-09-08 12:44:39 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@172.30.200.206> | 2016-09-08 12:44:40 +0000 |
commit | dba76d80546f04dc22ddbf4dc70d4cc7206716f0 (patch) | |
tree | deb40a25d7e10bdca4e7b1f3962639bd5725047f /ci/deploy.sh | |
parent | a7accc442ec95252077d716b229d84ef86cb23ce (diff) | |
parent | 51510a96718c909cbcbf02256c440dbdceab7227 (diff) |
Merge "moving inventory file parsing to python"
Diffstat (limited to 'ci/deploy.sh')
-rwxr-xr-x | ci/deploy.sh | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/ci/deploy.sh b/ci/deploy.sh index 91663dfc..00441975 100755 --- a/ci/deploy.sh +++ b/ci/deploy.sh @@ -179,8 +179,19 @@ parse_cmdline() { exit 1 fi - if [[ -n "$virtual" && -n "$INVENTORY_FILE" ]]; then - echo -e "${red}ERROR: You should not specify an inventory with virtual deployments${reset}" + # inventory file usage validation + if [[ -n "$virtual" ]]; then + if [[ -n "$INVENTORY_FILE" ]]; then + echo -e "${red}ERROR: You should not specify an inventory file with virtual deployments${reset}" + exit 1 + else + INVENTORY_FILE='/tmp/inventory-virt.yaml' + fi + elif [[ -z "$INVENTORY_FILE" ]]; then + echo -e "${red}ERROR: You must specify an inventory file for baremetal deployments! Exiting...${reset}" + exit 1 + elif [[ ! -f "$INVENTORY_FILE" ]]; then + echo -e "{$red}ERROR: Inventory File: ${INVENTORY_FILE} does not exist! Exiting...${reset}" exit 1 fi @@ -194,16 +205,6 @@ parse_cmdline() { exit 1 fi - if [[ ! -z "$INVENTORY_FILE" && ! -f "$INVENTORY_FILE" ]]; then - echo -e "{$red}ERROR: Inventory File: ${INVENTORY_FILE} does not exist! Exiting...${reset}" - exit 1 - fi - - if [[ -z "$virtual" && -z "$INVENTORY_FILE" ]]; then - echo -e "${red}ERROR: You must specify an inventory file for baremetal deployments! Exiting...${reset}" - exit 1 - fi - if [[ "$net_isolation_enabled" == "FALSE" && "$post_config" == "TRUE" ]]; then echo -e "${blue}INFO: Post Install Configuration will be skipped. It is not supported with --flat${reset}" post_config="FALSE" @@ -226,9 +227,8 @@ main() { setup_undercloud_vm if [ "$virtual" == "TRUE" ]; then setup_virtual_baremetal $VM_CPUS $VM_RAM - elif [ -n "$INVENTORY_FILE" ]; then - parse_inventory_file fi + parse_inventory_file configure_undercloud overcloud_deploy if [ "$post_config" == "TRUE" ]; then |