# Unable to run azure resource group creation playbook

**URL:** <https://forum.ansible.com/t/unable-to-run-azure-resource-group-creation-playbook/35199>\
**Category:** Ansible Project\
**Tags:** azure\
**Created:** [May 20, 2021, 12:56am UTC](https://forum.ansible.com/t/unable-to-run-azure-resource-group-creation-playbook/35199 "2021-05-20T00:56:23Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rajaniesh\_Kaushikk](https://avatars.discourse-cdn.com/v4/letter/r/6de8d8/32.png) [@Rajaniesh\_Kaushikk](https://forum.ansible.com/u/Rajaniesh_Kaushikk)\
**Post date:** [May 20, 2021, 12:56am UTC](https://forum.ansible.com/t/unable-to-run-azure-resource-group-creation-playbook/35199/1 "2021-05-20T00:56:23Z")

</div>

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](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](https://github.com/ansible/ansible/issues/74758)

Regards  
Rajaniesh

---

<div class="post-metadata">

**Author:** ![Dick\_Visser](https://avatars.discourse-cdn.com/v4/letter/d/d9b06d/32.png) [@Dick\_Visser](https://forum.ansible.com/u/Dick_Visser)\
**Post date:** [May 20, 2021, 4:25am UTC](https://forum.ansible.com/t/unable-to-run-azure-resource-group-creation-playbook/35199/2 "2021-05-20T04:25:44Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Rajaniesh\_Kaushikk](https://avatars.discourse-cdn.com/v4/letter/r/6de8d8/32.png) [@Rajaniesh\_Kaushikk](https://forum.ansible.com/u/Rajaniesh_Kaushikk)\
**Post date:** [May 20, 2021, 1:15pm UTC](https://forum.ansible.com/t/unable-to-run-azure-resource-group-creation-playbook/35199/3 "2021-05-20T13:15:06Z")

</div>

Do you have correct instructions for working on ansible for azure workloads?

---

<div class="post-metadata">

**Author:** ![Dick\_Visser](https://avatars.discourse-cdn.com/v4/letter/d/d9b06d/32.png) [@Dick\_Visser](https://forum.ansible.com/u/Dick_Visser)\
**Post date:** [May 20, 2021, 2:24pm UTC](https://forum.ansible.com/t/unable-to-run-azure-resource-group-creation-playbook/35199/4 "2021-05-20T14:24:19Z")

</div>

The ansible docs at  
[https://docs.ansible.com/ansible/latest/scenario\_guides/guide\_azure.html](https://docs.ansible.com/ansible/latest/scenario_guides/guide_azure.html)

---

<div class="post-metadata">

**Author:** ![Rajaniesh\_Kaushikk](https://avatars.discourse-cdn.com/v4/letter/r/6de8d8/32.png) [@Rajaniesh\_Kaushikk](https://forum.ansible.com/u/Rajaniesh_Kaushikk)\
**Post date:** [May 21, 2021, 2:15am UTC](https://forum.ansible.com/t/unable-to-run-azure-resource-group-creation-playbook/35199/5 "2021-05-21T02:15:44Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Michael\_M1](https://avatars.discourse-cdn.com/v4/letter/m/e274bd/32.png) [@Michael\_M1](https://forum.ansible.com/u/Michael_M1)\
**Post date:** [May 21, 2021, 2:42am UTC](https://forum.ansible.com/t/unable-to-run-azure-resource-group-creation-playbook/35199/6 "2021-05-21T02:42:02Z")

</div>

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
