doc: use FQCN for vmware_rest examples

Use the collection name + the module name for clarity.
pull/72163/head
Gonéri Le Bouder 4 years ago
parent bb2c96aacc
commit af7fd0f79d

@ -1,5 +1,5 @@
- name: Add a floppy disk drive - name: Add a floppy disk drive
vcenter_vm_hardware_floppy: vmware.vmware_rest.vcenter_vm_hardware_floppy:
vm: '{{ test_vm1_info.id }}' vm: '{{ test_vm1_info.id }}'
allow_guest_control: true allow_guest_control: true
register: my_floppy_drive register: my_floppy_drive

@ -1,9 +1,9 @@
- name: Attach a VM to a dvswitch - name: Attach a VM to a dvswitch
vcenter_vm_hardware_ethernet: vmware.vmware_rest.vcenter_vm_hardware_ethernet:
vm: '{{ test_vm1_info.id }}' vm: '{{ test_vm1_info.id }}'
pci_slot_number: 4 pci_slot_number: 4
backing: backing:
type: DISTRIBUTED_PORTGROUP type: DISTRIBUTED_PORTGROUP
network: "{{ my_portgroup_info.dvs_portgroup_info.dvswitch1[0].key }}" network: "{{ my_portgroup_info.dvs_portgroup_info.dvswitch1[0].key }}"
start_connected: false start_connected: false
register: _vm_hardware_ethernet_1 register: vm_hardware_ethernet_1

@ -1,5 +1,5 @@
- name: Attach an ISO image to a guest VM - name: Attach an ISO image to a guest VM
vcenter_vm_hardware_cdrom: vmware.vmware_rest.vcenter_vm_hardware_cdrom:
vm: '{{ test_vm1_info.id }}' vm: '{{ test_vm1_info.id }}'
type: SATA type: SATA
sata: sata:
@ -9,4 +9,4 @@
backing: backing:
iso_file: '[ro_datastore] fedora.iso' iso_file: '[ro_datastore] fedora.iso'
type: ISO_FILE type: ISO_FILE
register: _result register: _result

@ -1,3 +1,3 @@
- name: Build a list of all the clusters - name: Build a list of all the clusters
vcenter_cluster_info: vmware.vmware_rest.vcenter_cluster_info:
register: all_the_clusters register: all_the_clusters

@ -1,3 +1,3 @@
- name: Build a list of all the folders - name: Build a list of all the folders
vcenter_folder_info: vmware.vmware_rest.vcenter_folder_info:
register: my_folders register: my_folders

@ -1,6 +1,6 @@
- name: Build a list of all the folders with the type VIRTUAL_MACHINE and called vm - name: Build a list of all the folders with the type VIRTUAL_MACHINE and called vm
vcenter_folder_info: vmware.vmware_rest.vcenter_folder_info:
filter_type: VIRTUAL_MACHINE filter_type: VIRTUAL_MACHINE
filter_names: filter_names:
- vm - vm
register: my_folders register: my_folders

@ -1,5 +1,5 @@
- name: Change vm-tools upgrade policy to MANUAL - name: Change vm-tools upgrade policy to MANUAL
vcenter_vm_tools: vmware.vmware_rest.vcenter_vm_tools:
vm: '{{ test_vm1_info.id }}' vm: '{{ test_vm1_info.id }}'
upgrade_policy: MANUAL upgrade_policy: MANUAL
register: _result register: _result

@ -1,5 +1,5 @@
- name: Change vm-tools upgrade policy to UPGRADE_AT_POWER_CYCLE - name: Change vm-tools upgrade policy to UPGRADE_AT_POWER_CYCLE
vcenter_vm_tools: vmware.vmware_rest.vcenter_vm_tools:
vm: '{{ test_vm1_info.id }}' vm: '{{ test_vm1_info.id }}'
upgrade_policy: UPGRADE_AT_POWER_CYCLE upgrade_policy: UPGRADE_AT_POWER_CYCLE
register: _result register: _result

@ -1,4 +1,4 @@
- name: Collect information about a specific VM - name: Collect information about a specific VM
vcenter_vm_info: vmware.vmware_rest.vcenter_vm_info:
vm: '{{ search_result.value[0].vm }}' vm: '{{ search_result.value[0].vm }}'
register: test_vm1_info register: test_vm1_info

@ -1,4 +1,4 @@
- name: Collect the hardware information - name: Collect the hardware information
vcenter_vm_hardware_info: vmware.vmware_rest.vcenter_vm_hardware_info:
vm: '{{ search_result.value[0].vm }}' vm: '{{ search_result.value[0].vm }}'
register: my_vm1_hardware_info register: my_vm1_hardware_info

@ -1,5 +1,5 @@
- name: Create a SATA adapter at PCI slot 34 - name: Create a SATA adapter at PCI slot 34
vcenter_vm_hardware_adapter_sata: vmware.vmware_rest.vcenter_vm_hardware_adapter_sata:
vm: '{{ test_vm1_info.id }}' vm: '{{ test_vm1_info.id }}'
pci_slot_number: 34 pci_slot_number: 34
register: _sata_adapter_result_1 register: _sata_adapter_result_1

@ -1,5 +1,5 @@
- name: Create a VM - name: Create a VM
vcenter_vm: vmware.vmware_rest.vcenter_vm:
placement: placement:
cluster: "{{ my_cluster_info.id }}" cluster: "{{ my_cluster_info.id }}"
datastore: "{{ my_datastore.datastore }}" datastore: "{{ my_datastore.datastore }}"
@ -11,4 +11,4 @@
memory: memory:
hot_add_enabled: true hot_add_enabled: true
size_MiB: 1024 size_MiB: 1024
register: _result register: _result

@ -1,7 +1,7 @@
- name: Create a new disk - name: Create a new disk
vcenter_vm_hardware_disk: vmware.vmware_rest.vcenter_vm_hardware_disk:
vm: '{{ test_vm1_info.id }}' vm: '{{ test_vm1_info.id }}'
type: SATA type: SATA
new_vmdk: new_vmdk:
capacity: 320000 capacity: 320000
register: my_new_disk register: my_new_disk

@ -1,5 +1,5 @@
- name: Dedicate one core to the VM - name: Dedicate one core to the VM
vcenter_vm_hardware_cpu: vmware.vmware_rest.vcenter_vm_hardware_cpu:
vm: '{{ test_vm1_info.id }}' vm: '{{ test_vm1_info.id }}'
count: 1 count: 1
register: _result register: _result

@ -1,4 +1,4 @@
- name: Get VM storage policy - name: Get VM storage policy
vcenter_vm_storage_policy_info: vmware.vmware_rest.vcenter_vm_storage_policy_info:
vm: '{{ test_vm1_info.id }}' vm: '{{ test_vm1_info.id }}'
register: _result register: _result

@ -1,8 +1,8 @@
- name: Get guest filesystem information - name: Get guest filesystem information
vcenter_vm_guest_localfilesystem_info: vmware.vmware_rest.vcenter_vm_guest_localfilesystem_info:
vm: '{{ test_vm1_info.id }}' vm: '{{ test_vm1_info.id }}'
register: _result register: _result
until: until:
- _result is not failed - _result is not failed
retries: 60 retries: 60
delay: 5 delay: 5

@ -1,4 +1,4 @@
- name: Get guest identity information - name: Get guest identity information
vcenter_vm_guest_identity_info: vmware.vmware_rest.vcenter_vm_guest_identity_info:
vm: '{{ test_vm1_info.id }}' vm: '{{ test_vm1_info.id }}'
register: _result register: _result

@ -1,4 +1,4 @@
- name: Get guest network interfaces information - name: Get guest network interfaces information
vcenter_vm_guest_networking_interfaces_info: vmware.vmware_rest.vcenter_vm_guest_networking_interfaces_info:
vm: '{{ test_vm1_info.id }}' vm: '{{ test_vm1_info.id }}'
register: _result register: _result

@ -1,4 +1,4 @@
- name: Get guest network routes information - name: Get guest network routes information
vcenter_vm_guest_networking_routes_info: vmware.vmware_rest.vcenter_vm_guest_networking_routes_info:
vm: '{{ test_vm1_info.id }}' vm: '{{ test_vm1_info.id }}'
register: _result register: _result

@ -1,4 +1,4 @@
- name: Get guest networking information - name: Get guest networking information
vcenter_vm_guest_networking_info: vmware.vmware_rest.vcenter_vm_guest_networking_info:
vm: '{{ test_vm1_info.id }}' vm: '{{ test_vm1_info.id }}'
register: _result register: _result

@ -1,4 +1,4 @@
- name: Get guest power information - name: Get guest power information
vcenter_vm_power_info: vmware.vmware_rest.vcenter_vm_power_info:
vm: '{{ test_vm1_info.id }}' vm: '{{ test_vm1_info.id }}'
register: _result register: _result

@ -1,5 +1,5 @@
- name: Increase the memory of a VM - name: Increase the memory of a VM
vcenter_vm_hardware_memory: vmware.vmware_rest.vcenter_vm_hardware_memory:
vm: '{{ test_vm1_info.id }}' vm: '{{ test_vm1_info.id }}'
size_MiB: 1080 size_MiB: 1080
register: _result register: _result

@ -1,4 +1,4 @@
- name: List the SCSI adapter of a given VM - name: List the SCSI adapter of a given VM
vcenter_vm_hardware_adapter_scsi_info: vmware.vmware_rest.vcenter_vm_hardware_adapter_scsi_info:
vm: '{{ test_vm1_info.id }}' vm: '{{ test_vm1_info.id }}'
register: _result register: _result

@ -1,4 +1,4 @@
- name: List the cdrom devices on the guest - name: List the cdrom devices on the guest
vcenter_vm_hardware_cdrom_info: vmware.vmware_rest.vcenter_vm_hardware_cdrom_info:
vm: '{{ test_vm1_info.id }}' vm: '{{ test_vm1_info.id }}'
register: _result register: _result

@ -1,5 +1,5 @@
- name: Look up the VM called test_vm1 in the inventory - name: Look up the VM called test_vm1 in the inventory
register: search_result register: search_result
vcenter_vm_info: vmware.vmware_rest.vcenter_vm_info:
filter_names: filter_names:
- test_vm1 - test_vm1

@ -1,3 +1,3 @@
- name: Retrieve a list of all the datastores - name: Retrieve a list of all the datastores
vcenter_datastore_info: vmware.vmware_rest.vcenter_datastore_info:
register: my_datastores register: my_datastores

@ -1,4 +1,4 @@
- name: Retrieve details about the first cluster - name: Retrieve details about the first cluster
vcenter_cluster_info: vmware.vmware_rest.vcenter_cluster_info:
cluster: "{{ all_the_clusters.value[0].cluster }}" cluster: "{{ all_the_clusters.value[0].cluster }}"
register: my_cluster_info register: my_cluster_info

@ -1,4 +1,4 @@
- name: Retrieve the disk information from the VM - name: Retrieve the disk information from the VM
vcenter_vm_hardware_disk_info: vmware.vmware_rest.vcenter_vm_hardware_disk_info:
vm: '{{ test_vm1_info.id }}' vm: '{{ test_vm1_info.id }}'
register: _result register: _result

@ -1,4 +1,4 @@
- name: Retrieve the memory information from the VM - name: Retrieve the memory information from the VM
vcenter_vm_hardware_memory_info: vmware.vmware_rest.vcenter_vm_hardware_memory_info:
vm: '{{ test_vm1_info.id }}' vm: '{{ test_vm1_info.id }}'
register: _result register: _result

@ -1,5 +1,5 @@
- name: Turn the NIC's start_connected flag on - name: Turn the NIC's start_connected flag on
vcenter_vm_hardware_ethernet: vmware.vmware_rest.vcenter_vm_hardware_ethernet:
nic: '{{ _vm_hardware_ethernet_1.id }}' nic: '{{ vm_hardware_ethernet_1.id }}'
start_connected: true start_connected: true
vm: '{{ test_vm1_info.id }}' vm: '{{ test_vm1_info.id }}'

@ -1,4 +1,4 @@
- name: Turn the power of the VM on - name: Turn the power of the VM on
vcenter_vm_power: vmware.vmware_rest.vcenter_vm_power:
state: start state: start
vm: '{{ test_vm1_info.id }}' vm: '{{ test_vm1_info.id }}'

@ -1,6 +1,6 @@
- name: Upgrade the VM hardware version - name: Upgrade the VM hardware version
vcenter_vm_hardware: vmware.vmware_rest.vcenter_vm_hardware:
upgrade_policy: AFTER_CLEAN_SHUTDOWN upgrade_policy: AFTER_CLEAN_SHUTDOWN
upgrade_version: VMX_13 upgrade_version: VMX_13
vm: '{{ test_vm1_info.id }}' vm: '{{ test_vm1_info.id }}'
register: _result register: _result

@ -1,9 +1,9 @@
- name: Wait until my VM is ready - name: Wait until my VM is ready
vcenter_vm_tools_info: vmware.vmware_rest.vcenter_vm_tools_info:
vm: '{{ test_vm1_info.id }}' vm: '{{ test_vm1_info.id }}'
register: vm_tools_info register: vm_tools_info
until: until:
- vm_tools_info is not failed - vm_tools_info is not failed
- vm_tools_info.value.run_state != "NOT_RUNNING" - vm_tools_info.value.run_state == "RUNNING"
retries: 60 retries: 60
delay: 5 delay: 5

@ -1,3 +1,3 @@
- name: collect a list of the datacenters - name: collect a list of the datacenters
vcenter_datacenter_info: vmware.vmware_rest.vcenter_datacenter_info:
register: my_datacenters register: my_datacenters
Loading…
Cancel
Save