ansible-vsphere-gos-validation
ansible-vsphere-gos-validation copied to clipboard
[New Feature] research new methods for getting VM IP address
SUMMARY
Try to use community.vmware modules instead of tasks "delegate_to" ESXi host. For example, copy task delegate_to ESXi host in below files:
linux/deploy_vm/amazonlinux/reconfigure_amazonlinux_vm.yml
linux/deploy_vm/photon/reconfigure_photon_vm.yml
linux/deploy_vm/ubuntu/reconfigure_ubuntu_iso_vm.yml
linux/deploy_vm/ubuntu/ubuntu_install_os.yml
linux/deploy_vm/ubuntu/reconfigure_ubuntu_ova_vm.yml
...
ENVIRONMENT / OS
All
Transfer file from local to ESXi datastore:
./linux/deploy_vm/amazonlinux/reconfigure_amazonlinux_vm.yml:44: delegate_to: "{{ esxi_hostname }}"
./linux/deploy_vm/photon/reconfigure_photon_vm.yml:31: delegate_to: "{{ esxi_hostname }}"
./linux/deploy_vm/ubuntu/reconfigure_ubuntu_iso_vm.yml:55: delegate_to: "{{ esxi_hostname }}"
./linux/deploy_vm/ubuntu/ubuntu_install_os.yml:17: delegate_to: "{{ esxi_hostname }}"
./linux/deploy_vm/ubuntu/reconfigure_ubuntu_ova_vm.yml:29: delegate_to: "{{ esxi_hostname }}"
date command can be used as usual:
./linux/stat_hosttime/stat_hosttime.yml:34: delegate_to: "{{ esxi_hostname }}"
Get vmware.log file or search keywords in vmware.log file:
./windows/check_quiesce_snapshot/collect_vss_logs.yml:11: delegate_to: "{{ esxi_hostname }}"
./windows/utils/win_empty_vmware_log.yml:12: delegate_to: "{{ esxi_hostname }}"
./windows/utils/win_check_winbsod.yml:12: delegate_to: "{{ esxi_hostname }}"
./windows/guest_customization/check_guest_reset_time.yml:17: delegate_to: "{{ esxi_hostname }}"
./common/vm_search_vmware_log.yml:23: delegate_to: "{{ esxi_hostname }}"
./common/vm_wait_gosc_completed.yml:24: delegate_to: "{{ esxi_hostname }}"
Enable guest IP hack:
./common/vm_get_ip_esxcli.yml:53: delegate_to: "{{ esxi_hostname }}"
./common/vm_get_world_id.yml:18: delegate_to: "{{ esxi_hostname }}"
./common/esxi_enable_guest_ip_hack.yml:15: delegate_to: "{{ esxi_hostname }}"
Now we only have below files need to delegate to ESXi hostname:
./common/esxi_enable_guest_ip_hack.yml:7: delegate_to: "{{ esxi_hostname }}"
./common/esxi_enable_guest_ip_hack.yml:15: delegate_to: "{{ esxi_hostname }}"
./common/vm_get_world_id.yml:18: delegate_to: "{{ esxi_hostname }}"
./common/vm_get_ip_esxcli.yml:53: delegate_to: "{{ esxi_hostname }}"
./common/vm_get_ip_esxcli.yml:87: delegate_to: "{{ esxi_hostname }}"
./linux/stat_hosttime/stat_hosttime.yml:34: delegate_to: "{{ esxi_hostname }}"
./windows/guest_customization/check_guest_reset_time.yml:17: delegate_to: "{{ esxi_hostname }}"
./windows/utils/win_empty_vmware_log.yml:12: delegate_to: "{{ esxi_hostname }}"
Use serial port or check existing script.