diff --git a/roles/virtualization/tasks/vmware.yml b/roles/virtualization/tasks/vmware.yml index 20d3e50..4c571b5 100644 --- a/roles/virtualization/tasks/vmware.yml +++ b/roles/virtualization/tasks/vmware.yml @@ -1,4 +1,3 @@ ---- - name: Create VM in vCenter delegate_to: localhost community.vmware.vmware_guest: @@ -33,7 +32,7 @@ type: dhcp register: vmware_guest_result failed_when: - - vmware_guest_result.failed + - vmware_guest_result.failed is defined and vmware_guest_result.failed - "'error' in vmware_guest_result" - "'failed' in vmware_guest_result" - vmware_guest_result.rc is defined and vmware_guest_result.rc != 0