# ansible azure module - attach disk or resize vhd (Linux)

**URL:** <https://forum.ansible.com/t/ansible-azure-module-attach-disk-or-resize-vhd-linux/22161>\
**Category:** Ansible Project\
**Tags:** azure, ubuntu\
**Created:** [July 29, 2016, 8:06am UTC](https://forum.ansible.com/t/ansible-azure-module-attach-disk-or-resize-vhd-linux/22161 "2016-07-29T08:06:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nilgun\_celik](https://avatars.discourse-cdn.com/v4/letter/n/58956e/32.png) [@nilgun\_celik](https://forum.ansible.com/u/nilgun_celik)\
**Post date:** [July 29, 2016, 8:06am UTC](https://forum.ansible.com/t/ansible-azure-module-attach-disk-or-resize-vhd-linux/22161/1 "2016-07-29T08:06:09Z")

</div>

Hi there,

I have been trying to expand the default 30GB image size for Ubuntu 14.04 image on Azure store.

Normally I attach a secondary data disk to my vm instance and mount it afterwards.  
Another option would be to resize the current container in the associated storage account.

As far as know it is possible to achieve these programatically:

Example for resizing existing disk via Powershell  
[https://blogs.msdn.microsoft.com/cloud\_solution\_architect/2016/05/24/step-by-step-how-to-resize-a-linux-vm-os-disk-in-azure-arm/](https://blogs.msdn.microsoft.com/cloud_solution_architect/2016/05/24/step-by-step-how-to-resize-a-linux-vm-os-disk-in-azure-arm/)

Example for attaching new data disk via Azure CLI  
[https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-linux-add-disk/](https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-linux-add-disk/)

Yet I couldn’t find a task that would help me with any of the above.

Can you suggest any solutions on how I should proceed to write ansible tasks for these operations?

Thanks in advance,
