This gist describes how to install azure-cli with Ansible.
Disclaimer: Code has not been tested so it may not work, but the intent is still clear.
Reference: Azure/azure-cli#20476 (note that issue has been opened by an engineer working at Microsoft on Azure CLI, so I take it as "it's ok to install azure-cli with pip assumning you don't have problem with using Pypi".)