# vmware template deployment issue

**URL:** <https://forum.ansible.com/t/vmware-template-deployment-issue/34857>\
**Category:** Ansible Project\
**Tags:** vmware\
**Created:** [March 25, 2021, 3:09pm UTC](https://forum.ansible.com/t/vmware-template-deployment-issue/34857 "2021-03-25T15:09:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rene\_Paquin](https://avatars.discourse-cdn.com/v4/letter/r/e9a140/32.png) [@Rene\_Paquin](https://forum.ansible.com/u/Rene_Paquin)\
**Post date:** [March 25, 2021, 3:09pm UTC](https://forum.ansible.com/t/vmware-template-deployment-issue/34857/1 "2021-03-25T15:09:27Z")

</div>

Currently on version 2.10.6 and installed the community vmware collection and dependencies. I am running the playbook below and getting this error:

“msg”: “TypeError was returned, please ensure to give correct inputs. Field "ip" is not optional”.

Not sure what I am missing here. Any help is appreciated,

Thanks,

- hosts: localhost

gather\_facts: no

vars\_files:

- group\_vars/vars

- group\_vars/vars\_sec

tasks:

- name: Clone the template

community.vmware.vmware\_guest:

hostname: “{{ vcenter\_server }}”

username: “{{ vcenter\_user }}”

password: “{{ vcenter\_pass }}”

validate\_certs: False

name: “{{ name }}”

template: “{{ template }}”

datacenter: “{{ datacenter\_name }}”

folder: “{{ folder }}”

cluster: “{{ cluster\_name }}”

datastore: “{{ datastore }}”

networks:

- name: “{{ network }}”

ip: “{{ ip }}”

netmask: 255.255.254.0

gateway: “{{ gw }}”

dns\_servers:

- 10.10.82.255

- 10.100.46.20

- vlan: “{{ vlan }}”

type: static

state: poweredon

wait\_for\_ip\_address: yes

delegate\_to: localhost

register: deploy\_vm

---

<div class="post-metadata">

**Author:** ![Rene\_Paquin](https://avatars.discourse-cdn.com/v4/letter/r/e9a140/32.png) [@Rene\_Paquin](https://forum.ansible.com/u/Rene_Paquin)\
**Post date:** [March 25, 2021, 3:18pm UTC](https://forum.ansible.com/t/vmware-template-deployment-issue/34857/2 "2021-03-25T15:18:42Z")

</div>

Forgot to mention that I am attempting to deploy a windows server.

Rene

---

<div class="post-metadata">

**Author:** ![Rene\_Paquin](https://avatars.discourse-cdn.com/v4/letter/r/e9a140/32.png) [@Rene\_Paquin](https://forum.ansible.com/u/Rene_Paquin)\
**Post date:** [March 25, 2021, 3:38pm UTC](https://forum.ansible.com/t/vmware-template-deployment-issue/34857/3 "2021-03-25T15:38:24Z")

</div>

Figured it out. In the playbook I had a redundant entry - vlan: “{{ vlan }}” Once I removed it all was good.

Thanks for listening.

Rene
