# azure\_rm\_deployment error ansible 2.1.1.0 \_\_init\_\_() takes exactly 1 argument (2 given)

**URL:** <https://forum.ansible.com/t/azure-rm-deployment-error-ansible-2-1-1-0-init-takes-exactly-1-argument-2-given/22244>\
**Category:** Ansible Project\
**Tags:** azure, ubuntu, awx\
**Created:** [August 9, 2016, 1:08pm UTC](https://forum.ansible.com/t/azure-rm-deployment-error-ansible-2-1-1-0-init-takes-exactly-1-argument-2-given/22244 "2016-08-09T13:08:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![M\_Ghaleb](https://avatars.discourse-cdn.com/v4/letter/m/f4b2a3/32.png) [@M\_Ghaleb](https://forum.ansible.com/u/M_Ghaleb)\
**Post date:** [August 9, 2016, 1:08pm UTC](https://forum.ansible.com/t/azure-rm-deployment-error-ansible-2-1-1-0-init-takes-exactly-1-argument-2-given/22244/1 "2016-08-09T13:08:15Z")

</div>

Hi All,

I’m trying to deploy an Azure template using the azure\_rm\_deployment module.

ubuntu 14.04 TLS  
ansible 2.1.1.0  
azure 2.0.0rc5

I get the below error:

`

TASK [ansible-azure-provisioner : Deploying your Azure Jumphox] \*\*\*  
task path: /var/lib/awx/projects/_9\_\_ansible\_cloudfirst\_master/roles/internal/ansible-azure-provisioner/tasks/main.yml:11  
\<40.118.63.1\> ESTABLISH LOCAL CONNECTION FOR USER: awx  
\<40.118.63.1\> EXEC /bin/sh -c ‘( umask 77 && mkdir -p “`echo $HOME/.ansible/tmp/ansible-tmp-1470747867.04-122827512832920`” && echo ansible-tmp-1470747867.04-122827512832920=“`echo $HOME/.ansible/tmp/ansible-tmp-1470747867.04-122827512832920`” ) && sleep 0’  
\<40.118.63.1\> PUT /tmp/tmpxr0A6K TO /var/lib/awx/.ansible/tmp/ansible-tmp-1470747867.04-122827512832920/azure\_rm\_deployment  
\<40.118.63.1\> EXEC /bin/sh -c ‘LANG=en\_US.UTF-8 LC\_ALL=en\_US.UTF-8 LC\_MESSAGES=en\_US.UTF-8 /usr/bin/python /var/lib/awx/.ansible/tmp/ansible-tmp-1470747867.04-122827512832920/azure\_rm\_deployment; rm -rf “/var/lib/awx/.ansible/tmp/ansible-tmp-1470747867.04-122827512832920/” \> /dev/null 2\>&1 && sleep 0’  
fatal: [40.118.63.1]: FAILED! =\> {“changed”: false, “failed”: true, “invocation”: {“module\_name”: “azure\_rm\_deployment”}, “module\_stderr”: "/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/util/ssl_.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see [https://urllib3.readthedocs.org/en/latest/security.html#snimissingwarning.\n](https://urllib3.readthedocs.org/en/latest/security.html#snimissingwarning.%5Cn) SNIMissingWarning\n/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/util/ssl\_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see [https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.\n](https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.%5Cn) InsecurePlatformWarning\nTraceback (most recent call last):\n File "/tmp/ansible\_Qp3l\_v/ansible\_module\_azure\_rm\_deployment.py", line 660, in \n main()\n File "/tmp/ansible\_Qp3l\_v/ansible\_module\_azure\_rm\_deployment.py", line 656, in main\n AzureRMDeploymentManager()\n File "/tmp/ansible\_Qp3l\_v/ansible\_module\_azure\_rm\_deployment.py", line 438, in **init** \n supports\_check\_mode=False)\n File "/tmp/ansible\_Qp3l\_v/ansible\_modlib.zip/ansible/module\_utils/azure\_rm\_common.py", line 192, in **init** \n File "/tmp/ansible\_Qp3l\_v/ansible\_module\_azure\_rm\_deployment.py", line 449, in exec\_module\n deployment = self.deploy\_template()\n File "/tmp/ansible\_Qp3l\_v/ansible\_module\_azure\_rm\_deployment.py", line 493, in deploy\_template\n self.rm\_client.resource\_groups.create\_or\_update(self.resource\_group\_name, params)\n File "/tmp/ansible\_Qp3l\_v/ansible\_modlib.zip/ansible/module\_utils/azure\_rm\_common.py", line 596, in rm\_client\n File "/usr/local/lib/python2.7/dist-packages/azure/mgmt/resource/resources/resource\_management\_client.py", line 141, in **init** \n self.\_serialize = Serializer(client\_models)\nTypeError: **init** () takes exactly 1 argument (2 given)\n", “module\_stdout”: “”, “msg”: “MODULE FAILURE”, “parsed”: false}

`

Any idea? I’ve installed urllib3[secure] no luck

MG

---

<div class="post-metadata">

**Author:** ![Trond\_Hindenes](https://avatars.discourse-cdn.com/v4/letter/t/96bed5/32.png) [@Trond\_Hindenes](https://forum.ansible.com/u/Trond_Hindenes)\
**Post date:** [August 10, 2016, 12:46am UTC](https://forum.ansible.com/t/azure-rm-deployment-error-ansible-2-1-1-0-init-takes-exactly-1-argument-2-given/22244/2 "2016-08-10T00:46:07Z")

</div>

Could you please share an example playbook? We’re using this module without issues.

---

<div class="post-metadata">

**Author:** ![M\_Ghaleb](https://avatars.discourse-cdn.com/v4/letter/m/f4b2a3/32.png) [@M\_Ghaleb](https://forum.ansible.com/u/M_Ghaleb)\
**Post date:** [August 11, 2016, 10:06am UTC](https://forum.ansible.com/t/azure-rm-deployment-error-ansible-2-1-1-0-init-takes-exactly-1-argument-2-given/22244/3 "2016-08-11T10:06:29Z")

</div>

Hi Trond,

thank you for your reply, it turns out to be the msrest, we were using 0.4.0 and it only works with 0.4.1.

I’ve updated it and it works now fine.

BR

---

<div class="post-metadata">

**Author:** ![Trond\_Hindenes](https://avatars.discourse-cdn.com/v4/letter/t/96bed5/32.png) [@Trond\_Hindenes](https://forum.ansible.com/u/Trond_Hindenes)\
**Post date:** [August 13, 2016, 10:09pm UTC](https://forum.ansible.com/t/azure-rm-deployment-error-ansible-2-1-1-0-init-takes-exactly-1-argument-2-given/22244/4 "2016-08-13T22:09:45Z")

</div>

Nice. There was a lot of version mess around those modules for a while, glad you figured it out.
