prepare_vmware_tests: ensure 'VM Network' exists (#65616)

Depending on the ESXi configuration, the 'VM Network' may missing.
This commit is contained in:
Gonéri Le Bouder 2019-12-10 09:08:42 -05:00 committed by GitHub
parent 53cd0bdd29
commit 030b20b024
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -17,3 +17,14 @@
esxi_hostname: '{{ item }}'
state: absent
with_items: "{{ esxi_hosts }}"
- name: Add Management Network VM Portgroup
vmware_portgroup:
hostname: '{{ item }}'
username: '{{ esxi_user }}'
password: '{{ esxi_password }}'
esxi_hostname: 'item'
switch: "vSwitch0"
portgroup: VM Network
validate_certs: no
with_items: "{{ esxi_hosts }}"