vmware issue

56 views
Skip to first unread message

Rene Paquin

unread,
Aug 17, 2021, 4:09:58 PM8/17/21
to ansible...@googlegroups.com

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
rpa...@wlu.ca

 

Roberto Paz

unread,
Aug 17, 2021, 10:12:49 PM8/17/21
to Ansible Project
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.

Reply all
Reply to author
Forward
0 new messages