strange thing about vmware_gueest module

hello, list!

ansible 2.9

I have this in my playbook:

  • name: Create a virtual machine on given ESXi hostname
    vmware_guest:
    hostname: “some”
    username: “someone”
    password: “somepass”
    template: “{{ vmtemplate }}”
    validate_certs: false
    folder: “”
    datacenter: qarea
    name: “{{ tempname }}”
    state: poweredon
    guest_id: ubuntu64Guest
    cluster: “DRS”
    disk:
  • size_gb: “{{ disksize }}”
    type: thin
    datastore: DSS
    hardware:
    memory_mb: “{{ memsize }}”
    num_cpus: “{{ ncpus }}”
    scsi: paravirtual
    networks:
  • name: Localnet
    start_connected: yes
    type: dhcp
    when: “{{ localnet | bool == true }}”
  • name: AS
    start_connected: yes
    when: “{{ asnet | bool == true }}”
    wait_for_ip_address: true
    delegate_to: localhost
    register: deploy_vm

if I remove network section completely, then it successfully creates vm, connects it to the default network (Localnet in my case) and then everything works as expected.

if I add the networks section then:

  1. in vm i see the corresponding to intefaces with no carrier state
  2. in vsphere management interface I see the two networks bound to this vm, in not connected state. I am able set them to connected state then.

is this a bug? or am i missing something?

thank you