diff --git a/contrib/azurerm/apply-rg.sh b/contrib/azurerm/apply-rg.sh index 635d166bb138c03e519eb6a68c5f85fa5c7e45f1..efa330bb55d97f394c34df2cf825d9795cf71135 100755 --- a/contrib/azurerm/apply-rg.sh +++ b/contrib/azurerm/apply-rg.sh @@ -9,10 +9,10 @@ if [ "$AZURE_RESOURCE_GROUP" == "" ]; then exit 1 fi -if [ $(az &>/dev/null) ] ; then +if az &>/dev/null; then echo "azure cli 2.0 found, using it instead of 1.0" ./apply-rg_2.sh "$AZURE_RESOURCE_GROUP" -elif [ $(azure &>/dev/null) ] ; then +elif azure &>/dev/null; then ansible-playbook generate-templates.yml azure group deployment create -f ./.generated/network.json -g $AZURE_RESOURCE_GROUP diff --git a/contrib/azurerm/clear-rg.sh b/contrib/azurerm/clear-rg.sh index f2537cca0ef586e3a07c962751d2447413f17d20..64fea1f16d07ffc1d8d915db646455d25dac6492 100755 --- a/contrib/azurerm/clear-rg.sh +++ b/contrib/azurerm/clear-rg.sh @@ -9,7 +9,7 @@ if [ "$AZURE_RESOURCE_GROUP" == "" ]; then exit 1 fi -if [ $(az &>/dev/null) ] ; then +if az &>/dev/null; then echo "azure cli 2.0 found, using it instead of 1.0" ./clear-rg_2.sh "$AZURE_RESOURCE_GROUP" else diff --git a/contrib/azurerm/generate-inventory.sh b/contrib/azurerm/generate-inventory.sh index 0642e5d6d473ccefb08eb35a948204de6772b4b6..b3eb9c0fe6444074ca937ae78c60f19d815c1599 100755 --- a/contrib/azurerm/generate-inventory.sh +++ b/contrib/azurerm/generate-inventory.sh @@ -9,9 +9,9 @@ if [ "$AZURE_RESOURCE_GROUP" == "" ]; then exit 1 fi # check if azure cli 2.0 exists else use azure cli 1.0 -if [ $(az &>/dev/null) ] ; then +if az &>/dev/null; then ansible-playbook generate-inventory_2.yml -e azure_resource_group="$AZURE_RESOURCE_GROUP" -elif [ $(azure &>/dev/null) ]; then +elif azure &>/dev/null; then ansible-playbook generate-inventory.yml -e azure_resource_group="$AZURE_RESOURCE_GROUP" else echo "Azure cli not found"