I am having an issue deploying servers from templates using ansible with the vmware_guest module. Below is the playbook. I get the following error regardless of what I configure for datastores, esxi host etc. I am currently running the latest version
},
“msg”: “Network interface ‘Network adapter 1’ uses network ‘DVSwitch: c5 de 2d 50 8f fe 22 dd-fd dc 6a 6b 5f 9c 97 73’, which is not accessible.”
}
I can deploy a server from template via the vcenter console so this appears to be an ansible issue? Any ideas?
Thanks
- hosts: localhost
gather_facts: no
vars_files:
-
group_vars/vars
-
group_vars/vars_sec
tasks:
- name: Clone the template
vmware_guest:
hostname: “{{ vcenter_server }}”
username: “{{ vcenter_user }}”
password: “{{ vcenter_pass }}”
validate_certs: False
name: “{{ name }}”
template: “{{ template }}”
datacenter: “{{ datacenter_name }}”
folder: “{{ folder }}”
esxi_hostname: “{{ esxi_hostname }}”
state: poweredon
wait_for_ip_address: yes
delegate_to: localhost