Hi,
I tried running the azure resource group creation playbook by following these steps given in the MS site:https://docs.microsoft.com/en-us/azure/developer/ansible/install-on-linux-vm?tabs=ansible#file-credentials
but it is throwing this error
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ModuleNotFoundError: No module named ‘urllib3.packages.six’
fatal: [localhost]: FAILED! => {“changed”: false, “msg”: “Failed to import the required Python library (msrestazure) on ansible-controller’s Python /usr/bin/python3.6. Please read module documentation and install 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”}
This issue is logged here:
https://github.com/ansible/ansible/issues/74758
Regards
Rajaniesh
Hi
the errors indicate some basic problem with the ansible installation.
Either the instructions on the MS site are incorrect/incomplete/out of date, or you didn’t follow them completely/accurately.
Contact the author(s) of those instructions for questions about them.
Do you have correct instructions for working on ansible for azure workloads?
Sir,
I have used the exact same step and these steps are given in the Microsoft site as well which I followed but it shows the Python erro and now it shows the error for different module
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ModuleNotFoundError: No module named 'packaging
fatal: [localhost]: FAILED! => {“changed”: false, “msg”: “Failed to import the required Python library (packaging) on ansible-controller’s Python /usr/bin/python3.6. Please read module documentation and install 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”}
Any Clue!!
Regards
Rajaniesh
If you installed ansible with pip, you can use the file (from the base
of your virtual environment)
./lib/python3.8/site-packages/ansible_collections/community/azure/tests/sanity/requirements.txt
as input for 'pip install -r <path_to_requirements.txt>. From my
install, it contains the following, which worked for me getting the
correct module dependencies. Previous to finding this trick, I
continually had fits trying to get azurerm modules to work, but now it
works fine:
packaging
requests[security]
xmltodict
azure-cli-core==2.11.1
azure-cli-nspkg==3.0.2
azure-common==1.1.11
azure-mgmt-authorization==0.51.1
azure-mgmt-batch==5.0.1
azure-mgmt-cdn==3.0.0
azure-mgmt-compute==10.0.0
azure-mgmt-containerinstance==1.4.0
azure-mgmt-containerregistry==2.0.0
azure-mgmt-containerservice==9.1.0
azure-mgmt-dns==2.1.0
azure-mgmt-keyvault==1.1.0
azure-mgmt-marketplaceordering==0.1.0
azure-mgmt-monitor==0.5.2
azure-mgmt-managedservices==1.0.0
azure-mgmt-network==10.2.0
azure-mgmt-nspkg==2.0.0
azure-mgmt-privatedns==0.1.0
azure-mgmt-redis==5.0.0
azure-mgmt-resource==10.2.0
azure-mgmt-rdbms==1.4.1
azure-mgmt-servicebus==0.5.3
azure-mgmt-sql==0.10.0
azure-mgmt-storage==11.1.0
azure-mgmt-trafficmanager==0.50.0
azure-mgmt-web==0.41.0
azure-nspkg==2.0.0
azure-storage==0.35.1
msrest==0.6.10
msrestazure==0.6.4
azure-keyvault==1.0.0a1
azure-graphrbac==0.61.1
azure-mgmt-cosmosdb==0.5.2
azure-mgmt-hdinsight==0.1.0
azure-mgmt-devtestlabs==3.0.0
azure-mgmt-loganalytics==1.0.0
azure-mgmt-automation==0.1.1
azure-mgmt-iothub==0.7.0