From bfc3687f7014ec45b05e1ee90d9d2ca9092f64d6 Mon Sep 17 00:00:00 2001 From: Diane Wang <41371902+Tomorrow9@users.noreply.github.com> Date: Thu, 9 May 2019 12:58:19 -0700 Subject: [PATCH] remove guest_id check when use template (#55281) --- lib/ansible/modules/cloud/vmware/vmware_guest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/modules/cloud/vmware/vmware_guest.py b/lib/ansible/modules/cloud/vmware/vmware_guest.py index 7d6a52b6ea..d79c83186b 100644 --- a/lib/ansible/modules/cloud/vmware/vmware_guest.py +++ b/lib/ansible/modules/cloud/vmware/vmware_guest.py @@ -165,7 +165,7 @@ options: - " virtual machine with RHEL7 64 bit, will be 'rhel7_64Guest'" - " virtual machine with CensOS 64 bit, will be 'centos64Guest'" - " virtual machine with Ubuntu 64 bit, will be 'ubuntu64Guest'" - - This field is required when creating a virtual machine. + - This field is required when creating a virtual machine, not required when creating from the template. - > Valid values are referenced here: U(http://pubs.vmware.com/vsphere-6-5/topic/com.vmware.wssdk.apiref.doc/vim.vm.GuestOsDescriptor.GuestOsIdentifier.html) @@ -866,7 +866,7 @@ class PyVmomiHelper(PyVmomi): def configure_guestid(self, vm_obj, vm_creation=False): # guest_id is not required when using templates - if self.params['template'] and not self.params['guest_id']: + if self.params['template']: return # guest_id is only mandatory on VM creation