summaryrefslogtreecommitdiff
path: root/test/integration/targets/prepare_vmware_tests/tasks/setup_dvswitch.yml
blob: ba36a4619613ea03deb6cba3b67450874d802c64 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
---
- name: Create the DVSwitch
  vmware_dvswitch:
    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:
    esxi_hostname: "{{ item }}"
    switch_name: '{{ dvswitch1 }}'
    vmnics:
      - vmnic1
    state: present
  with_items: "{{ esxi_hosts }}"
  when: setup_attach_host is defined