The template has a defined network interface? If that's the case, try to remote the network interface to the template.
*vmware_guest *module is able to add network interfaces if required. Just provide the rigth VLAN according to naming convention used in vmware cluster. El martes, 17 de agosto de 2021 a la(s) 15:09:58 UTC-5, [email protected] escribió: > 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 > > > > ******************************** > Rene Paquin - Systems Administrator > Wilfrid Laurier University > Waterloo, Ontario > (519)884-0710 x3795 <(519)%20884-0710> > [email protected] > > > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/5c5ca0dc-dc46-4fc6-afef-d59e452ccec6n%40googlegroups.com.
