Add multiwrite, diskmode, and shares to vcenter_vm_hardware_disks
matuck opened this issue · 0 comments
matuck commented
SUMMARY
When attaching shared disks to a new host it would be nice to have the ability for multiwrite, shares, and disk mode
ISSUE TYPE
- Feature Idea
COMPONENT NAME
vcenter_vm_hardware_disk module
ADDITIONAL INFORMATION
One may need to configure any of these settings when attaching disks to a send server
- name: Look up the VM called {{ existingvm }} in vmware inventory
register: existing_search_result
vmware.vmware_rest.vcenter_vm_info:
filter_names:
- "{{ existingvm }}"
- name: Collect information about {{ existingvm }}
register: existing_vm_info
vmware.vmware_rest.vcenter_vm_info:
vm: '{{ existing_search_result.value[0].vm }}'
- name: Look up the VM called {{ newvm }} in vmware inventory
register: new_search_result
vmware.vmware_rest.vcenter_vm_info:
filter_names:
- "{{ newvm }}"
- name: Collect information about {{ newvm }}
register: new_vm_info
vmware.vmware_rest.vcenter_vm_info:
vm: '{{ new_search_result.value[0].vm }}'
- name: Ensure {{ newvm }} has shared disks
loop: "{{ existing_vm_info.value.disks.values() | list }}"
when: item.scsi.bus != 0
vmware.vmware_rest.vcenter_vm_hardware_disk:
vm: '{{ new_vm_info.id }}'
type: "{{ item.type }}"
label: "{{ item.label }}"
backing:
type: "{{ item.backing.type }}"
vmdk_file: "{{ item.backing.vmdk_file }}"
scsi:
bus: "{{ item.scsi.bus }}"
unit: "{{ item.scsi.unit }}"