# Dell EMC Unity/Unisphere with Ansible

**URL:** <https://forum.ansible.com/t/dell-emc-unity-unisphere-with-ansible/31332>\
**Category:** Ansible Project\
**Created:** [September 22, 2019, 3:23am UTC](https://forum.ansible.com/t/dell-emc-unity-unisphere-with-ansible/31332 "2019-09-22T03:23:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tanisha\_Mishra](https://avatars.discourse-cdn.com/v4/letter/t/c37758/32.png) [@Tanisha\_Mishra](https://forum.ansible.com/u/Tanisha_Mishra)\
**Post date:** [September 22, 2019, 3:23am UTC](https://forum.ansible.com/t/dell-emc-unity-unisphere-with-ansible/31332/1 "2019-09-22T03:23:13Z")

</div>

Using the python module [https://github.com/jialehuo/ansible-dellemc-unity/blob/master/library/dellemc\_unity.py](https://github.com/jialehuo/ansible-dellemc-unity/blob/master/library/dellemc_unity.py) , below have designed the playbook but am facing Request body errors.

PLAYBOOK:

---

<div class="post-metadata">

**Author:** ![vbotka](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/vbotka/32/359_2.png) [@vbotka](https://forum.ansible.com/u/vbotka)\
**Post date:** [September 22, 2019, 6:25am UTC](https://forum.ansible.com/t/dell-emc-unity-unisphere-with-ansible/31332/2 "2019-09-22T06:25:27Z")

</div>

The parameter "unity\_updates" seems to be wrong. Make sure the parenthesis,  
quotation and other items are correct. Try to create the list (if  
"unity\_updates" is really a list) of dictionaries first and take a look at  
the debug whether this is what you want. For example, or rather as a  
demonstration of the proposal (I have no idea of the module's details)

&nbsp;&nbsp;&nbsp;&nbsp;- set\_fact:  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;unity\_updates: "{{ unity\_updates|default() +  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[{resource\_type: storageResource,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fields: 'name:{{ lun\_name }},  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lunParameters: {pool: {id: "{{ pool\_id }}"}},  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;size: "{{ lun\_size }}",  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;isThinEnabled:"true",  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;isDataReductionEnabled:"false"}',  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;action: 'createLun'}] }}"  
&nbsp;&nbsp;&nbsp;&nbsp;- debug:  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var: unity\_updates

Cheers,

&nbsp;&nbsp;-vlado

---

<div class="post-metadata">

**Author:** ![Vijay\_Ravindran](https://avatars.discourse-cdn.com/v4/letter/v/34f0e0/32.png) [@Vijay\_Ravindran](https://forum.ansible.com/u/Vijay_Ravindran)\
**Post date:** [January 4, 2020, 8:43am UTC](https://forum.ansible.com/t/dell-emc-unity-unisphere-with-ansible/31332/3 "2020-01-04T08:43:10Z")

</div>

HI Team

I am having a tough time on changing the mgmt ip address via URI module and even properly having login info, logout and updating headers.  
Still I get “HTTP Error 401”

The URL which I update is via POST  
“https://\<unity\_ip\>/api/instances/mgmtInterfaces/mgmt\_ipv4/action/modify”

request your thoughts

thanks

regds  
Vj
