Hi
I’m trying to install the Azure.Azcollection module on an AWX server, but encountering the following dependency error:
TASK [List all keys in specific key vault] *************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ModuleNotFoundError: No module named ‘azure.cli.core.auth’
fatal: [alma8-1]: FAILED! => {“changed”: false, “msg”: “Failed to import the required Python library (ansible[azure] (azure >= 2.0.0)) on awx’s Python /awx/venv/zts/bin/python. Please read the module documentation and install it in the appropriate location. If the required library is installed, but Ansible is using the wrong Python interpreter, please consult the documentation on ansible_python_interpreter”}
The server uses a (to my knowledge) fairly standard docker based AWX setup. Within the tasks container I’ve installed all the dependencies in the /azcollection/requirements-azure.txt file, and also installed the Azure CLI tool separately.
I haven’t specified a virtual environment pre-install, but other changes such as changing error messages have been detected post-install after adding other components, and the azcollection files have appeared within the relevant venv directory, so I’m fairly sure that installing to the wrong venv isn’t a factor here.
The following modules are confirmed as present:
bash-4.4# pip3 list | grep azure | grep core
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
azure-cli-core (2.11.1)
azure-core (1.24.1)
azure-mgmt-core (1.2.0)
There doesn’t seem to be a more specific module for azure-cli-core-auth, I’ve tried a few variations on the name.
bash-4.4# pip3 install azure-cli-core-auth
WARNING: Running pip install with root privileges is generally not a good idea. Try pip3 install --user
instead.
Collecting azure-cli-core-auth
Could not find a version that satisfies the requirement azure-cli-core-auth (from versions: )
No matching distribution found for azure-cli-core-auth
I was by contrast able to successfully install the azcollection module on a bare bones Centos 8 box previously using just the requirements file and additionally installing Azure CLI, so something is different about the AWX setup.
Software versions: python: 3.6.8, ansible: 2.9.10, awx: 13.0.0
Can anybody assist further in helping me troubleshoot this? As far as I can tell the dependency should be present, and I’m not certain where to go next with this.
Thanks.
Alex.