The Azure CLI by default will always install the most recent version, without the option to specify a specific version to install.
This can be worked around by first installing the most recent version of the CLI and then downloading and setting a specific version.
This article assumes you are utilizing our "Azure CLI" Orb:
The following commands first install the CLI and then install and set the version
2.18.0 to be used.
- azure-cli/install - run: apt-cache policy azure-cli | sudo apt-get install --allow-downgrades azure-cli=2.18.0-1~stretch
The only adjustment that needs to be made to the above is adjusting
2.18.0-1~stretch to point to the version you want to utilize.