update azure contrib to use azure cli 2.0

This commit is contained in:
Abdelsalam Abbas
2017-07-19 11:00:27 +02:00
parent 460b5824c3
commit fee3f288c0
9 changed files with 119 additions and 14 deletions

View File

@@ -9,6 +9,10 @@ if [ "$AZURE_RESOURCE_GROUP" == "" ]; then
exit 1
fi
ansible-playbook generate-templates.yml
azure group deployment create -g "$AZURE_RESOURCE_GROUP" -f ./.generated/clear-rg.json -m Complete
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
ansible-playbook generate-templates.yml
azure group deployment create -g "$AZURE_RESOURCE_GROUP" -f ./.generated/clear-rg.json -m Complete
fi