mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-22 12:03:58 -07:00
VMware: Return Disk UUID information (#45157)
This fix adds feature of disk uuid for given virtual machine disk. Fixes: #45149 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
parent
65c9090714
commit
9c1ba18607
2 changed files with 32 additions and 6 deletions
|
@ -37,16 +37,37 @@
|
|||
|
||||
- debug: var=vm1
|
||||
|
||||
- name: create new VMs with non-existent network
|
||||
- name: Gather facts about virtual machine disks
|
||||
vmware_guest_disk_facts:
|
||||
validate_certs: False
|
||||
validate_certs: no
|
||||
hostname: "{{ vcsim }}"
|
||||
username: "{{ vcsim_instance['json']['username'] }}"
|
||||
password: "{{ vcsim_instance['json']['password'] }}"
|
||||
name: "{{ vm1 }}"
|
||||
datacenter: "{{ (vm1 | basename).split('_')[0] }}"
|
||||
register: disk_facts
|
||||
- debug: var=disk_facts
|
||||
|
||||
- debug:
|
||||
msg: '{{ disk_facts }}'
|
||||
|
||||
- name: assert that no changes were made
|
||||
assert:
|
||||
that:
|
||||
- "not disk_facts.changed"
|
||||
|
||||
- name: Gather facts about virtual machine disks in check mode
|
||||
vmware_guest_disk_facts:
|
||||
validate_certs: no
|
||||
hostname: "{{ vcsim }}"
|
||||
username: "{{ vcsim_instance['json']['username'] }}"
|
||||
password: "{{ vcsim_instance['json']['password'] }}"
|
||||
name: "{{ vm1 }}"
|
||||
datacenter: "{{ (vm1 | basename).split('_')[0] }}"
|
||||
register: disk_facts
|
||||
check_mode: yes
|
||||
|
||||
- debug:
|
||||
msg: '{{ disk_facts }}'
|
||||
|
||||
- name: assert that no changes were made
|
||||
assert:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue