- name: Create administrative user
  community.vmware.vmware_guest:
    hostname: "{{ esxi_host }}"
    username: "{{ esxi_username }}"
    password: "{{ esxi_password }}"
    user_name: "{{ vm_username }}"
    user_password: "{{ vm_password }}"
    groups: administrator
    state: present

- name: Create VM network with VLAN
  community.vmware.vmware_guest_network:
    hostname: "{{ esxi_host }}"
    username: "{{ esxi_username }}"
    password: "{{ esxi_password }}"
    validate_certs: false
    datastore: "{{ datastore }}"
    switch_name: TESTSWITCH
    name: "{{ network_name }}"
    vlan: "{{ vlan_id }}"
    state: present

- name: Deploy Linux VM to datastore
  community.vmware.vmware_guest:
    hostname: "{{ esxi_host }}"
    username: "{{ esxi_username }}"
    password: "{{ esxi_password }}"
    validate_certs: false
    datastore: "{{ datastore }}"
    folder: /
    name: "{{ vm_name }}"
    template: /root/DSL.ova
    state: present
  networks:
    - name: "{{ network_name }}"
      device_type: vmxnet3
      network_type: standard
      start_connected: yes
      state: present
 The word "vm" should not appear in your response.
user