---
- name: Add a VMware vSwitchs
  vmware_vswitch:
    validate_certs: no
    hostname: '{{ vcenter_hostname }}'
    username: '{{ vcenter_username }}'
    password: '{{ vcenter_password }}'
    esxi_hostname: '{{ item }}'
    switch_name: "{{ switch1 }}"
    state: present
  with_items: "{{ esxi_hosts }}"
