ansible/test/integration/targets/prepare_vmware_tests/tasks/setup_dvswitch.yml
Gonéri Le Bouder 93ea961205 vmware_guest: enable 3 extra tests
- network_with_dvpg
- network_with_portgroup.yml
- template_d1_c1_f0.yml
2019-07-29 15:28:52 +02:00

27 lines
757 B
YAML

---
- name: Create the DVSwitch
vmware_dvswitch:
validate_certs: no
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
datacenter_name: '{{ dc1 }}'
switch_name: '{{ dvswitch1 }}'
switch_version: 6.0.0
mtu: 9000
uplink_quantity: 2
discovery_proto: lldp
discovery_operation: both
state: present
- name: Attach the hosts to the DVSwitch
vmware_dvs_host:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
esxi_hostname: "{{ item }}"
switch_name: '{{ dvswitch1 }}'
vmnics:
- vmnic1
state: present
with_items: "{{ esxi_hosts }}"
when: setup_attach_host is defined