ansible-collections / azure

Development area for Azure Collections
https://galaxy.ansible.com/azure/azcollection
GNU General Public License v3.0
248 stars 332 forks source link

azure_rm_virtualmachine data_disks not changed when added #416

Open barto90 opened 3 years ago

barto90 commented 3 years ago
SUMMARY

Creating a new VM with initial data_disks as follows works perfectly;

But if we add a new disk afterwards when the VM is deployed like;

The new disk is not added to the VM. The code shows no changes but shows "Ok"   TASK [create_virtualmachine_catalog : Create a virtual machine from catalog AZ1SR0029] *** [WARNING]: Module did not set no_log for ssh_password_enabled ok: [localhost]

ISSUE TYPE
COMPONENT NAME

azure_rm_virtualmachine

ANSIBLE VERSION
ansible 2.10.2
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.8/dist-packages/ansible
  executable location = /usr/local/bin/ansible
  python version = 3.8.5 (default, Jul 28 2020, 12:59:40) [GCC 9.3.0]
STEPS TO REPRODUCE
  1. create a vm with for example 2 datadisks
  2. Wait for the vm to be created
  3. add one extra data disks
EXPECTED RESULTS

Data disk is added also after the creation of the VM

ACTUAL RESULTS

Data disk is not added. Code return "Ok" while expected "Changed"

Fred-sun commented 3 years ago

@barto90 Thank you for reporting this problem. We will investigate this problem as soon as possible!

FrontierDynamic commented 2 months ago

I found the same issue today. Versions: ansible core 2.16.3 azure.azcollection 2.6.0

Fred-sun commented 2 months ago

@FrontierDynamic Okay, I'll check and fix it. Thank you!