Description
SUMMARY
ansible 2.9.22
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
ISSUE TYPE
- Bug Report
COMPONENT NAME
vmware_guest
ANSIBLE VERSION
ansible 2.9.22
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/dist-packages/ansible
executable location = /usr/bin/ansible
python version = 2.7.12 (default, Mar 1 2021, 11:38:31) [GCC 5.4.0 20160609]
CONFIGURATION
empy
OS / ENVIRONMENT
ubuntu linux
Linux jenkins 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
STEPS TO REPRODUCE
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
EXPECTED RESULTS
when set to true both(or one of) networks are connected on VM poweron
ACTUAL RESULTS
networks are added but left unconnected. in vm i see 2 interfaces with NO CARRIER/DOWN state.
if I log into vsphere web interface I see both networks in unconnected state.
by hands. I am able to set them to connected, then VM interfaces are up, and got ip addresses.